github.com/ethersphere/bee/v2@v2.2.0/Dockerfile (about) 1 FROM golang:1.22 AS build 2 3 WORKDIR /src 4 # enable modules caching in separate layer 5 COPY go.mod go.sum ./ 6 RUN go mod download 7 COPY . ./ 8 9 RUN make binary 10 11 FROM debian:12.4-slim 12 13 ENV DEBIAN_FRONTEND noninteractive 14 15 RUN apt-get update && apt-get install -y --no-install-recommends \ 16 ca-certificates; \ 17 apt-get clean; \ 18 rm -rf /var/lib/apt/lists/*; \ 19 groupadd -r bee --gid 999; \ 20 useradd -r -g bee --uid 999 --no-log-init -m bee; 21 22 # make sure mounted volumes have correct permissions 23 RUN mkdir -p /home/bee/.bee && chown 999:999 /home/bee/.bee 24 25 COPY --from=build /src/dist/bee /usr/local/bin/bee 26 27 EXPOSE 1633 1634 28 USER bee 29 WORKDIR /home/bee 30 VOLUME /home/bee/.bee 31 32 ENTRYPOINT ["bee"]