feat: play application on docker under debug

This commit is contained in:
2022-08-07 00:20:37 +03:00
parent d87aed14f4
commit 5f88b64cbe
6 changed files with 29 additions and 65 deletions
+6 -5
View File
@@ -26,9 +26,10 @@ RUN go build -gcflags="all=-N -l" -o /build/app .
FROM alpine:latest
# Add entrypoint dependency
#RUN apk add --no-cache bash mysql-client mariadb-connector-c
RUN apk add --no-cache bash
#RUN apk add --no-cache mysql-client mariadb-connector-c
# Move to /backoffice_gateway directory as the place for resulting binary folder
# Move to /app directory as the place for resulting binary folder
WORKDIR /
# Copy binary from build to main folder
@@ -36,8 +37,8 @@ COPY --from=builder /go/bin/dlv .
COPY --from=builder /build/app app
# Copy some application assets
COPY --from=builder /source/deploy/docker/environment.sh ./docker/environment.sh
COPY --from=builder /source/deploy/docker/logging.sh ./docker/logging.sh
COPY --from=builder /source/deploy/docker/environment.sh ./deploy/docker/environment.sh
COPY --from=builder /source/deploy/docker/logging.sh ./deploy/docker/logging.sh
COPY --from=builder /source/entrypoint.sh .
#COPY --from=builder /source/migrations ./migrations
#COPY ./database/data.json /database/data.json
@@ -45,7 +46,7 @@ COPY --from=builder /source/entrypoint.sh .
# Export necessary port
EXPOSE 4040
# entry and start php-fpm server
# entry and start entrypoint with some actions and checks before CMD
ENTRYPOINT ["bash", "/entrypoint.sh" ]
# Command to run when starting the container