Created
August 18, 2016 06:31
-
-
Save ralfw/f76306a90a6172aab1c3cd3451c20866 to your computer and use it in GitHub Desktop.
Roll your own Elm Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build image with Node.js, Elm and Nginx | |
FROM debian:latest | |
# prepare | |
RUN apt-get -y update | |
RUN apt-get -y install apt-utils | |
# install curl, http://stackoverflow.com/questions/27273412/cannot-install-packages-inside-docker-ubuntu-image | |
RUN apt-get -y install curl | |
# node + npm, https://nodejs.org/en/download/package-manager/ (no sudo on debian) | |
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash | |
RUN apt-get install -y nodejs # check with node: --version | |
# elm, https://www.npmjs.com/package/elm, https://github.com/rtfeldman/node-test-runner | |
RUN npm install -g elm | |
RUN npm install -g elm-test | |
# nginx, https://www.linode.com/docs/websites/nodejs/how-to-install-nodejs-and-nginx-on-debian | |
RUN apt-get install -y nginx | |
# make elm reactor and nginx accessible | |
EXPOSE 8000 80 | |
# check installations with: | |
# node --version | |
# elm --version | |
# elm-test --version | |
# nginx -v | |
# run web servers: | |
# elm reactor | |
# service nginx start |
This doesn't make sense and I think violates the principles of Docker.
Why are you installing nginx? elm doesn't require node or npm either. So why are you install these?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is helpful. thanks!