File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 1- FROM golang:1.23.6-alpine AS BACK
1+ FROM golang:1.23.6 AS back
22WORKDIR /go/src/chainserver
33COPY . .
4- RUN apk add --no-cache gcc musl-dev
4+ RUN apt-get update && apt-get install -y bash gcc
55RUN chmod +x ./build.sh
66RUN ./build.sh
77
8- FROM alpine:latest AS STANDARD
8+ FROM debian:stable-slim AS standard
99LABEL MAINTAINER="https://casibase.org/"
1010ARG USER=chainserver
1111
12- RUN sed -i 's/https/http/' /etc/apk/repositories
13- RUN apk add --update sudo
14- RUN apk add curl
15- RUN apk add ca-certificates && update-ca-certificates
12+ RUN apt-get update && apt-get install -y sudo curl ca-certificates lsof && rm -rf /var/lib/apt/lists/*
1613
17- RUN adduser -D $USER -u 1000 \
14+ RUN useradd -m -u 1000 $USER \
1815 && echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER \
1916 && chmod 0440 /etc/sudoers.d/$USER \
20- && mkdir logs \
21- && chown -R $USER:$USER logs
17+ && mkdir / logs \
18+ && chown -R $USER:$USER / logs
2219
2320USER 1000
2421WORKDIR /
25- COPY --from=BACK --chown=$USER:$USER /go/src/chainserver/server ./server
22+ COPY --from=back --chown=$USER:$USER /go/src/chainserver/server ./server
23+ COPY --from=back --chown=$USER:$USER /go/src/chainserver/swagger ./swagger
2624
2725ENTRYPOINT ["/server" ]
Original file line number Diff line number Diff line change 88 echo " Google is blocked, Go proxy is enabled: GOPROXY=https://goproxy.cn,direct"
99 export GOPROXY=" https://goproxy.cn,direct"
1010fi
11- CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags=" -w -s" -o server .
11+ CGO_ENABLED=1 GOOS=linux go build -ldflags=" -w -s" -o server .
You can’t perform that action at this time.
0 commit comments