Skip to content

Instantly share code, notes, and snippets.

@mhart
Created December 1, 2020 16:30
Show Gist options
  • Save mhart/f77de4079d872d78b6538dba954b3213 to your computer and use it in GitHub Desktop.
Save mhart/f77de4079d872d78b6538dba954b3213 to your computer and use it in GitHub Desktop.
FROM golang:1-alpine3.12 AS build-image
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
RUN go build -tags lambda.norpc -ldflags="-s -w" main.go
FROM alpine:3.12
WORKDIR /app
# pdf2cairo is part of the poppler-utils package
# ttf-liberation includes common fonts we might need
RUN apk add --no-cache poppler-utils ttf-liberation
COPY --from=build-image /app/main ./
ENTRYPOINT ["/app/main"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment