17 lines
277 B
Docker
17 lines
277 B
Docker
|
|
FROM golang:1.20-alpine AS builder
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
COPY go.mod go.sum ./
|
||
|
|
RUN go mod download
|
||
|
|
|
||
|
|
COPY . .
|
||
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o sender main.go
|
||
|
|
|
||
|
|
FROM alpine:latest
|
||
|
|
WORKDIR /root/
|
||
|
|
COPY --from=builder /app/sender .
|
||
|
|
COPY public ./public
|
||
|
|
|
||
|
|
EXPOSE 3000
|
||
|
|
CMD ["./sender"]
|