-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.multistage
41 lines (31 loc) · 1.03 KB
/
Dockerfile.multistage
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
31
32
33
34
35
36
37
38
39
40
41
# syntax=docker/dockerfile:1
##
## Build
##
FROM golang:1.17.3-buster AS build
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY *.go ./
COPY app ./app
COPY common ./common
COPY controller ./controller
COPY docs ./docs
COPY env ./env
COPY models ./models
COPY router ./router
COPY service ./service
RUN go build -o /conv
##
## Deploy
##
#FROM gcr.io/distroless/base-debian10
FROM ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y -q install libreoffice libreoffice-writer ure libreoffice-java-common libreoffice-core libreoffice-common openjdk-11-jre-headless fonts-opensymbol hyphen-fr hyphen-de hyphen-en-us hyphen-it hyphen-ru fonts-dejavu fonts-dejavu-core fonts-dejavu-extra fonts-droid-fallback fonts-dustin fonts-f500 fonts-fanwood fonts-freefont-ttf fonts-liberation fonts-lmodern fonts-lyx fonts-sil-gentium fonts-texgyre fonts-tlwg-purisa && apt-get -q -y remove libreoffice-gnome
WORKDIR /
COPY --from=build /conv /conv
COPY ./config.yaml ./config.yaml
EXPOSE 8080
ENTRYPOINT ["/conv"]