This commit is contained in:
2023-05-21 08:46:53 -05:00
parent 8e2a20b0c7
commit e729154f27

View File

@@ -1,5 +1,5 @@
# Use golang:1.17 as the base image
FROM golang:1.20
FROM registry.durp.info/golang:1.20
ENV GOPATH /go
ENV PATH $PATH:$GOPATH/bin
@@ -8,13 +8,7 @@ ENV PATH $PATH:$GOPATH/bin
WORKDIR /app
# Copy the Go project files into the container
COPY . .
# Run swag init to generate Swagger documentation
RUN go install && go install github.com/swaggo/swag/cmd/swag@v1.8.12 && swag init
# Build the Go application inside the container
RUN go build -o main .
COPY ./output/main .
# Expose the port the application listens on
EXPOSE 8080