forked from 0xPolygonID/issuer-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-arm
45 lines (35 loc) · 1.18 KB
/
Dockerfile-arm
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
FROM ubuntu:22.04 as base
ARG VERSION
WORKDIR /service
ENV GOBIN /service/bin
COPY ./api ./api
COPY ./api_ui ./api_ui
COPY ./cmd ./cmd
COPY ./internal ./internal
COPY ./pkg ./pkg
COPY ./go.mod ./
COPY ./go.sum ./
RUN apt-get update
RUN apt-get install -y wget build-essential ca-certificates
RUN wget https://go.dev/dl/go1.20.5.linux-arm64.tar.gz
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH /usr/local/go/bin:/go/bin:$PATH
ENV GOBIN /service/bin
RUN tar -xvf go1.20.5.linux-arm64.tar.gz
RUN mv go /usr/local
RUN go mod download
RUN go install -buildvcs=false -ldflags "-X main.build=${VERSION}" ./cmd/...
FROM alpine:latest
RUN apk add --no-cache libstdc++ gcompat libgomp
RUN ln -sfv ld-linux-x86-64.so.2 /lib/libresolv.so.2
RUN apk add doas; \
adduser -S issuer -D -G wheel; \
echo 'permit nopass :wheel as root' >> /etc/doas.d/doas.conf;
RUN chmod g+rx,o+rx /
COPY --from=base ./service/api ./api
COPY --from=base ./service/api_ui ./api_ui
COPY --from=base ./service/bin/* ./
COPY --from=base ./service/pkg/credentials ./pkg/credentials
COPY --from=base "/go/pkg/mod/github.com/iden3/[email protected]/wasmer/packaged/" \
"/go/pkg/mod/github.com/iden3/[email protected]/wasmer/packaged/"