Dockerfile is building but not launching and I have no idea why
See original GitHub issueI’m trying to get IHaskell running on mybinder.org, and I’ve made what I think is a simple Dockerfile that builds correctly but fails to launch. I’ve reproduced it below:
FROM fpco/stack-build:lts-11.2
# Install all necessary Ubuntu packages
RUN apt-get update && apt-get install -y python3-pip libgmp-dev libmagic-dev libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libblas-dev liblapack-dev gcc g++ && \
rm -rf /var/lib/apt/lists/*
# Install Jupyter notebook
RUN pip3 install -U jupyter
ENV LANG en_US.UTF-8
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
ENV PATH $(stack path --local-install-root)/bin:$(stack path --snapshot-install-root)/bin:$(stack path --compiler-bin):${HOME}/.local/bin:${PATH}
ENV GHC_PACKAGE_PATH $(stack path --ghc-package-path)
RUN stack config set system-ghc --global true
RUN stack install ihaskell
RUN ihaskell install --stack
I’ve looked at the documentation on using Dockerfiles and I think I’m doing the right thing with installing Jupyter and running under the user jovyan
with ID 1000. When I do a docker build
locally and run it myself it seems to work correctly:
$ docker build -t ihaskell-mybinder:v1 .
$ docker run -it -p8888:8888 ihaskell-mybinder:v1 jupyter notebook --ip='0.0.0.0'
Is there something obvious I’m missing? I’m relatively inexperienced with Docker so any help would be appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Dockerfile is building but not launching and I have no idea why
I'm trying to get IHaskell running on mybinder.org, and I've made what I think is a simple Dockerfile that builds correctly but fails...
Read more >After docker build . the container is not displayed, why?
If your docker container is not visible after running it, something is likely failing in your build and that would stem from your...
Read more >9 Common Dockerfile Mistakes - Runnablog
9 Common Dockerfile Mistakes · 1. Running apt-get · 2. Using ADD instead of COPY · 3. Adding your entire application directory in...
Read more >How to Debug and Fix Common Docker Issues - DigitalOcean
In this troubleshooting guide aimed at people new to Docker, you'll troubleshoot problems when building Docker images, resolve naming ...
Read more >Unable to find Dockerfile - Build debugging - Fly.io
I have no idea why it can't find the Dockerfile. Possibly the context is not being passed properly but don't know how to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I will make a PR 😄
Adding the
CMD
seemed to make no difference.