-
Notifications
You must be signed in to change notification settings - Fork 68
/
Dockerfile
45 lines (32 loc) · 992 Bytes
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# syntax=docker/dockerfile:1
ARG BASE_IMG_TAG=nonroot
# --------------------------------------------------------
# Build
# --------------------------------------------------------
FROM golang:1.18.4-alpine3.15 as build
RUN set -eux; apk add --no-cache ca-certificates build-base;
RUN apk add git
# Needed by github.com/zondax/hid
RUN apk add linux-headers
WORKDIR /src/app/
COPY go.mod go.sum* ./
RUN go mod download
COPY . .
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev
RUN apk add --no-cache $PACKAGES
RUN LEDGER_ENABLED=false CGO_ENABLED=0 make install
# --------------------------------------------------------
# Runner
# --------------------------------------------------------
FROM gcr.io/distroless/base-debian11:${BASE_IMG_TAG}
#FROM ubuntu:20.04
ENV HOME /go-bitsong
WORKDIR $HOME
COPY --from=build /go/bin/bitsongd /bin/bitsongd
EXPOSE 26656
EXPOSE 26657
EXPOSE 9090
EXPOSE 1317
#ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["bitsongd"]
CMD [ "start" ]