Skip to content

Instantly share code, notes, and snippets.

@thinkmicroservices
Created February 25, 2020 01:08
Show Gist options
  • Select an option

  • Save thinkmicroservices/1442a7be7f12b25028c4e0c209878d46 to your computer and use it in GitHub Desktop.

Select an option

Save thinkmicroservices/1442a7be7f12b25028c4e0c209878d46 to your computer and use it in GitHub Desktop.
discovery-service: Dockerfile
# grab the base image
FROM openjdk:8-jdk-alpine
# install curl
RUN apk add --update \
curl \
&& rm -rf /var/cache/apk/*
# create a working volume in tmp
VOLUME /tmp
#define the jar dependency files
ARG DEPENDENCY=target/dependency
COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY ${DEPENDENCY}/META-INF /app/META-INF
COPY ${DEPENDENCY}/BOOT-INF/classes /app
EXPOSE 8761
ENTRYPOINT ["java","-cp","app:app/lib/*","com.thinkmicroservices.ri.spring.discovery.DiscoveryServiceApplication"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment