Skip to content
Snippets Groups Projects
Commit 7f529d88 authored by Ignacio Prusiel Mariscal's avatar Ignacio Prusiel Mariscal
Browse files

Dockerfile updated

parent a592257c
No related branches found
No related tags found
No related merge requests found
Pipeline #65480 passed with warnings
......@@ -19,23 +19,21 @@ RUN go env | grep GOINSECURE
RUN go env -w GOINSECURE=github.com && go mod download
# Copy the source code into the container
COPY ./cmd/migrate ./
COPY . /app
# Build the Go app
# RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main ./main.go
RUN GOOS=linux GOARCH=arm64 go build -o main ./main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main ./main.go
# Uncomment the following line to compile an image for arm64 arch
# RUN GOOS=linux GOARCH=arm64 go build -o main ./main.go
#Uncomment the following line to compile an image for arm64 arch
#RUN GOOS=linux GOARCH=arm64 go build -o main ./intent-based-migration.go
# Stage 2: Create the final image
FROM alpine:latest
# Set the working directory inside the final image
WORKDIR /root
# Copy the pre-built binary from the builder stage
COPY --from=builder /app/main .
# Command to run the executable
CMD ["./main"]
CMD ["./main"]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment