-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ded7ac
commit 79d5d7e
Showing
4 changed files
with
6 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,4 @@ 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/" | ||
COPY --from=base ./service/pkg/credentials ./pkg/credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM ubuntu:22.04 as base | ||
|
||
FROM golang:1.20.5 as base | ||
ARG VERSION | ||
WORKDIR /service | ||
ENV GOBIN /service/bin | ||
|
@@ -10,36 +9,19 @@ 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 apk add --update busybox>1.3.1-r0 | ||
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/" | ||
COPY --from=base ./service/pkg/credentials ./pkg/credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters