fix alot
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM golang:1.21-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache git bash
|
||||
|
||||
COPY src/go.mod src/go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY src/ .
|
||||
|
||||
RUN go build -o server .
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache ca-certificates bash
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/server .
|
||||
|
||||
COPY --from=builder /app/templates ./templates
|
||||
COPY --from=builder /app/uploads ./uploads
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["./server"]
|
||||
Reference in New Issue
Block a user