-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.starport
51 lines (37 loc) · 916 Bytes
/
Dockerfile.starport
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
42
43
44
45
46
47
48
49
50
51
# syntax = docker/dockerfile:1.2
# WARNING! Use `DOCKER_BUILDKIT=1` with `docker build` to enable --mount feature.
## prep the base image.
#
FROM golang:1.16.2-buster as base
RUN apt update && \
apt-get install -y \
build-essential \
ca-certificates \
curl
# enable faster module downloading.
ENV GOPROXY https://proxy.golang.org
## builder stage.
#
FROM base as builder
WORKDIR /starport
# cache dependencies.
COPY ./go.mod .
COPY ./go.sum .
RUN go mod download
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build go install -v ./...
## prep the final image.
#
FROM base
COPY --from=builder /go/bin/starport /usr/bin
RUN useradd -ms /bin/bash tendermint
USER tendermint
WORKDIR /apps
# see docs for exposed ports:
# https://docs.starport.network/configure/reference.html#host
EXPOSE 26657
EXPOSE 26656
EXPOSE 6060
EXPOSE 9090
EXPOSE 1317
ENTRYPOINT ["starport"]