13 lines
601 B
Docker
13 lines
601 B
Docker
FROM golang:latest as builder
|
|
WORKDIR /go/src/git.dm1sh.ru/dm1sh/any2pdf/
|
|
COPY *.go go.mod ./
|
|
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app .
|
|
|
|
FROM alpine:latest
|
|
RUN apk --no-cache --purge add imagemagick libreoffice ttf-dejavu ttf-opensans msttcorefonts-installer ttf-freefont ttf-liberation ttf-droid ttf-inconsolata ttf-font-awesome ttf-mononoki ttf-hack && rm -rf /usr/share/icons && rm -rf /usr/lib/libreoffice/share/gallery && update-ms-fonts && fc-cache -fv
|
|
WORKDIR /root/
|
|
COPY --from=builder /go/src/git.dm1sh.ru/dm1sh/any2pdf/app ./
|
|
COPY index.html ./
|
|
ENV PORT=8080
|
|
CMD ["./app"]
|