Created
May 24, 2019 09:08
-
-
Save fed-franz/e2aa4b1213de6235b43d4faad1115ed4 to your computer and use it in GitHub Desktop.
Dockerfile Example
This file contains hidden or 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
# Comment | |
FROM ubuntu:latest | |
# Local ENV | |
ENV init=init.sh | |
ENV dir1=./dir1 \ | |
dir2=./dir2 | |
# Install from APT | |
RUN apt-get update | |
RUN apt-get install --yes curl wget net-tools | |
# Copy files | |
WORKDIR /root/ | |
RUN mkdir localdir | |
COPY $dir1/file localdir/ | |
COPY $init /usr/local/bin/ | |
RUN chmod +x /usr/local/bin/$init | |
# Expose ports to outside for remote connections | |
EXPOSE 80 | |
# Then run initial script | |
# Here you can access ENV variables and do any setup process via Shell script | |
ENTRYPOINT ["./init.sh"] | |
#Arguments passed via 'docker run' will be passed to init.sh | |
CMD [""] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment