Files
tinder-api-wrapper/cmd/server/Dockerfile

25 lines
385 B
Docker

FROM golang:1.18-alpine AS builder
WORKDIR /app
# Copy go mod files
COPY go.mod ./
COPY go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the application
RUN go build -o /tinder-proxy ./cmd/server
# Use a smaller image for the final container
FROM alpine:latest
WORKDIR /
COPY --from=builder /tinder-proxy /tinder-proxy
EXPOSE 8080
ENTRYPOINT ["/tinder-proxy"]