forked from bitnami/render-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (20 loc) · 655 Bytes
/
Dockerfile
File metadata and controls
29 lines (20 loc) · 655 Bytes
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
# render-template in a container
#
# docker run --rm -i -e WHO=bitnami bitnami/render-template <<<"hello {{WHO}}"
#
FROM golang:1.16-stretch as build
RUN apt-get update && apt-get install -y --no-install-recommends \
git make upx \
&& rm -rf /var/lib/apt/lists/*
RUN go get -u \
golang.org/x/lint/golint \
golang.org/x/tools/cmd/goimports \
&& rm -rf $GOPATH/src/* && rm -rf $GOPATH/pkg/*
WORKDIR /go/src/app
COPY . .
RUN rm -rf out
RUN make build
RUN upx --ultra-brute out/render-template
FROM bitnami/minideb:stretch
COPY --from=build /go/src/app/out/render-template /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]