Skip to content

Instantly share code, notes, and snippets.

@cescoffier
Last active August 29, 2015 14:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cescoffier/ce3eb0ab53c386b2e6ea to your computer and use it in GitHub Desktop.
Save cescoffier/ce3eb0ab53c386b2e6ea to your computer and use it in GitHub Desktop.
Dockerfile for wisdom application
###
# Build:
# docker build -t wisdom/acme-sample .
#
# Run:
# docker run -d -p 9000:9000 wisdom/acme-sample
#
# Optional volumes:
# - Logs: /root/wisdom/logs
# - Applications (where app bundles live): /root/wisdom/application
#
# bash:
# docker run -d \
# -p 9000:9000 \
# -v `pwd`/target/wisdom/logs:/root/wisdom/logs \
# -v `pwd`/target/wisdom/application:/root/wisdom/application \
# wisdom/acme-sample
#
# fish:
# docker run -d \
# -p 9000:9000 \
# -v (pwd)/target/wisdom/logs:/root/wisdom/logs \
# -v (pwd)/target/wisdom/application:/root/wisdom/application \
# wisdom/acme-sample
#
#
###
FROM dockerfile/java:oracle-java8
# Add the wisdom distribution
ADD target/wisdom /root/wisdom
# Expose the port 9000
EXPOSE 9000
# Volumes
VOLUME /root/wisdom/logs
VOLUME /root/wisdom/application
# Change workdir.
WORKDIR /root/wisdom
RUN touch /root/wisdom.log
# For easier handling, we dump the log, so `docker logs containerId` displays
# the log.
CMD ./chameleon.sh; tail -F logs/wisdom.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment