forked from jippi/hashi-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (24 loc) · 1.02 KB
/
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
# build-env container
FROM golang:1.15.5 AS build-env
ENV CGO_ENABLED=0 GO111MODULE=on GOPROXY=https://proxy.golang.org
RUN apt-get update -q -y && \
apt-get install -q -y apt-transport-https ca-certificates gnupg && \
apt-key adv --fetch-keys https://dl.yarnpkg.com/debian/pubkey.gpg && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \
# https://github.com/yarnpkg/yarn/issues/6914
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get update -q -y && \
apt-get install -q -y yarn nodejs
ADD . /go/src/github.com/jippi/hashi-ui
WORKDIR /go/src/github.com/jippi/hashi-ui
RUN make -j rebuild
# application container
FROM alpine
# we need ca-certificates for any external https communication
RUN apk --update upgrade && \
apk add curl ca-certificates && \
update-ca-certificates && \
rm -rf /var/cache/apk/*
COPY --from=build-env /go/src/github.com/jippi/hashi-ui/backend/build/hashi-ui-linux-amd64 /hashi-ui
EXPOSE 3000
CMD ["/hashi-ui"]