Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
FROM golang:1.18-alpine

RUN apk add musl-dev
RUN apk add libc-dev
RUN apk add gcc
FROM golang:1.19-alpine as build

WORKDIR /app

COPY go.mod ./
COPY go.sum ./
COPY go.mod .
COPY go.sum .

RUN go mod download

COPY ./ /app
COPY . .

ENV CGO_ENABLED=0

RUN go build -o anonymousoverflow

FROM scratch

RUN go build -o /anonymousoverflow
COPY --from=build /app/anonymousoverflow /anonymousoverflow
COPY templates /templates
COPY public /public
COPY --from=build /etc/ssl/certs /etc/ssl/certs

EXPOSE 8080

Expand Down