-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (25 loc) · 824 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM ubuntu:18.04 as builder
RUN ln -snf /usr/share/zoneinfo/Etc/UTC /etc/localtime \
&& echo "Etc/UTC" > /etc/timezone
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
texlive-fonts-recommended=2017.20180305-1 \
texlive-plain-generic=2017.20180305-2 \
texlive-latex-extra=2017.20180305-2 \
ghostscript \
imagemagick \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /resume
COPY resume.tex .
RUN pdflatex resume.tex
FROM golang:1.17-alpine as server
WORKDIR /resume
COPY main.go .
COPY --from=builder /resume/resume.pdf .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /go/bin/resume main.go
FROM scratch
COPY --from=server /go/bin/resume /usr/local/bin/resume
ENTRYPOINT ["resume"]
EXPOSE 80