Browse Source

docker-copose setup

master
esoe 8 months ago
parent
commit
32fc8fe3d8
  1. 10
      docker-compose.yaml
  2. 11
      resource-service-api/dockerfile

10
docker-compose.yaml

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
version: "3"
services:
resource-service-api:
build: resource-service-api/
command: ["java","-jar","/app/resource-service-api-0.1.jar"]
ports:
- 80:8181
# docker-compose build
# docker-compose up -d
# docker-compose down

11
resource-service-api/dockerfile

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
FROM openjdk:17-jdk-alpine
COPY target/resource-service-api-0.1.jar message-server-1.0.0.jar
ENTRYPOINT ["java","-jar","/message-server-1.0.0.jar"]
# docker image build -t resource-service:latest .
# docker run -p8887:8888 message-server:latest
RUN apk update
RUN apk upgrade
COPY target/resource-service-api-0.1.jar /app/resource-service-api-0.1.jar
WORKDIR /app
# ENTRYPOINT ["java","-jar","/app/resource-service-api-0.1.jar"]
# docker image build -t resource-service-api:latest .
# docker run -p80:8181 resource-service-api:latest
Loading…
Cancel
Save