Skip to content

Instantly share code, notes, and snippets.

@frz-dev frz-dev/Dockerfile
Created May 24, 2019

Embed
What would you like to do?
Dockerfile Example
# 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
You can’t perform that action at this time.