Dockerfile
FROM java:openjdk-8-alpine WORKDIR /usr/src/app COPY ./target/*.jar ./app.jar ENTRYPOINT ["java","-Djava.security.egd=file:/dev/urandom","-jar","./app.jar", "--port=80"]
carts/docker/carts/Dockerfile
FROM weaveworksdemos/msd-java:jre-latest WORKDIR /usr/src/app COPY *.jar ./app.jar RUN chown -R ${SERVICE_USER}:${SERVICE_GROUP} ./app.jar USER ${SERVICE_USER} ARG BUILD_DATE ARG BUILD_VERSION ARG COMMIT LABEL org.label-schema.vendor="Weaveworks" \ org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.version="${BUILD_VERSION}" \ org.label-schema.name="Socks Shop: Cart" \ org.label-schema.description="REST API for Cart service" \ org.label-schema.url="https://github.com/microservices-demo/carts" \ org.label-schema.vcs-url="github.com:microservices-demo/carts.git" \ org.label-schema.vcs-ref="${COMMIT}" \ org.label-schema.schema-version="1.0" ENTRYPOINT ["/usr/local/bin/java.sh","-jar","./app.jar", "--port=80"]
docker-compose-zipkin.yml
version: '2' services: carts: image: weaveworksdemos/carts hostname: carts restart: always cap_drop: - all cap_add: - NET_BIND_SERVICE read_only: true tmpfs: - /tmp:rw,noexec,nosuid environment: - reschedule=on-node-failure - ZIPKIN_HOST=zipkin - ZIPKIN_ENABLED=true ports: - "8081:80" zipkin: image: openzipkin/zipkin hostname: zipkin restart: always cap_drop: - all cap_add: - CHOWN - SETGID - SETUID read_only: true tmpfs: - /tmp:rw,noexec,nosuid environment: - reschedule=on-node-failure ports: - "9411:9411"
Add Comment