This commit is contained in:
parent
69785d74a8
commit
0de80ee1bf
@ -4,19 +4,19 @@ FROM golang:latest as build
|
|||||||
# Set the working directory to /app
|
# Set the working directory to /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Copy the current directory contents into the container at /app
|
# Copy the current directory contents into the container at /app
|
||||||
COPY go.mod .
|
COPY server/go.mod .
|
||||||
COPY go.sum .
|
COPY server/go.sum .
|
||||||
# Download and install any required dependencies
|
# Download and install any required dependencies
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
COPY .. .
|
COPY .. .
|
||||||
|
|
||||||
# Build the Go app
|
# Build the Go app
|
||||||
RUN go build .
|
RUN go build -o serverBinary ./server/
|
||||||
|
|
||||||
FROM gcr.io/distroless/base-debian12
|
FROM gcr.io/distroless/base-debian12
|
||||||
|
|
||||||
COPY --from=build /app/kleinTodo .
|
COPY --from=build /app/serverBinary .
|
||||||
|
|
||||||
# Define the command to run the app when the container starts
|
# Define the command to run the app when the container starts
|
||||||
CMD ["./kleinTodo"]
|
CMD ["./serverBinary"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user