Haskell Stack Image Container Execute On Docker run

I am following the turorials from stackage and docker to run a haskell build via docker.

Building and Image creation works well and i can run the app via docker run -p 5000:5000 {imagename} {app-exe}

  • Docker: "Unknown instruction: VIRTUALENV'
  • Spring Cloud Samples Eureka - Docker - Use of underscore in link
  • Identify overlay networks from the inside of the container
  • Use Docker to compile and run untrusted code in Django App [closed]
  • How to run a windows docker container on linux host?
  • Weblogic + Docker + Vagrant = Connection Issue
  • I am using the build in features of the latest stack to create the docke image with this minimal configuration.

           base: "fpco/ubuntu-with-libgmp"

    How can i make the image to launch the executable automatically, so that i can just type docker run -p 5000:5000 {imagename}. I know how to do it in a dockerfile but not with stack. I was thinking that I have to use:

          - appname-exe

    No success, no matter if I just use the name of executable or the absolute path to it. Maybe I don’t understand what the entrypoint is for.

    I am using Docker for Mac.

    Any suggestions appreciated.


  • Delete entire project from docker registry?
  • How can i mount volume of glusterfs to /var/lib/docker in ubuntu 14.04
  • Bind-mount a host directory into a volume of a running docker container
  • Is it possible to run docker services in dockerfile based on some conditions?
  • Resolve docker-compose container names from host machine
  • Docker exposed ports unreacheable
  • One Solution collect form web for “Haskell Stack Image Container Execute On Docker run”

    I figured it out myself. Everything is working correctly, I just didn’t understand that stack creates two seperate images. One just for the environement and one for the entrypoint.

    So I checked docker images and found in deed two images. I was simpy running the wrong image. This is correct
    docker run -p 5000:5000 {imagename-app-exe}

    Man sometimes you don’t see the forest.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.