Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
FROM golang:1.21-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
# Initialize and download dependencies
|
||||
RUN go mod tidy
|
||||
|
||||
# Build the Go app
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o backend main.go
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /app/backend .
|
||||
EXPOSE 8080
|
||||
CMD ["./backend"]
|
||||
Reference in New Issue
Block a user