-
Notifications
You must be signed in to change notification settings - Fork 338
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
de64883
commit 6c4f361
Showing
3 changed files
with
41 additions
and
8 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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM golang:1.22 AS build | ||
|
||
ARG REACHABILITY_OVERRIDE_PUBLIC=false | ||
ARG BATCHFACTOR_OVERRIDE_PUBLIC=5 | ||
|
||
WORKDIR /src | ||
# enable modules caching in separate layer | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
COPY . ./ | ||
|
||
# Run make binary with specified arguments | ||
RUN make binary \ | ||
REACHABILITY_OVERRIDE_PUBLIC=$REACHABILITY_OVERRIDE_PUBLIC \ | ||
BATCHFACTOR_OVERRIDE_PUBLIC=$BATCHFACTOR_OVERRIDE_PUBLIC | ||
|
||
FROM debian:12.4-slim | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
groupadd -r bee --gid 999; \ | ||
useradd -r -g bee --uid 999 --no-log-init -m bee; | ||
|
||
# make sure mounted volumes have correct permissions | ||
RUN mkdir -p /home/bee/.bee && chown 999:999 /home/bee/.bee | ||
|
||
COPY --from=build /src/dist/bee /usr/local/bin/bee | ||
|
||
EXPOSE 1633 1634 | ||
USER bee | ||
WORKDIR /home/bee | ||
VOLUME /home/bee/.bee | ||
|
||
ENTRYPOINT ["bee"] |
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