From 32fc8fe3d8b35db6cdff729d7113fb3204329e4b Mon Sep 17 00:00:00 2001 From: esoe Date: Thu, 4 Apr 2024 17:55:15 +0300 Subject: [PATCH] docker-copose setup --- docker-compose.yaml | 10 ++++++++++ resource-service-api/dockerfile | 11 +++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index e69de29..b2a5574 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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 \ No newline at end of file diff --git a/resource-service-api/dockerfile b/resource-service-api/dockerfile index f77d76a..c97fc75 100644 --- a/resource-service-api/dockerfile +++ b/resource-service-api/dockerfile @@ -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 \ No newline at end of file +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 \ No newline at end of file