generated from oci/template
it builds and it runs, needs further testing
All checks were successful
Build Docker Image on Commit / build-and-publish (push) Successful in 9s
All checks were successful
Build Docker Image on Commit / build-and-publish (push) Successful in 9s
This commit is contained in:
parent
1ef69c170f
commit
e6e946ce44
5 changed files with 93 additions and 35 deletions
22
Dockerfile
22
Dockerfile
|
@ -8,7 +8,7 @@ RUN apt-get update && \
|
|||
clang \
|
||||
llvm \
|
||||
libclang-dev \
|
||||
libssl-dev \
|
||||
libssl-dev \
|
||||
pkg-config \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
@ -32,9 +32,23 @@ FROM debian:bookworm-slim
|
|||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
gosu \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy the compiled binary
|
||||
COPY --from=builder /src/freenet/target/release/freenet /usr/local/bin/freenet
|
||||
# Create default non-root user
|
||||
RUN useradd -m -u 1000 -s /bin/bash freenetuser && \
|
||||
mkdir -p /data && \
|
||||
chown freenetuser:freenetuser /data
|
||||
|
||||
CMD ["freenet", "-b", "0.0.0.0"]
|
||||
# Copy binary and entrypoint
|
||||
COPY --from=builder /src/freenet/target/release/freenet /usr/local/bin/
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Environment variables
|
||||
ENV DATA_DIR="/data/data" \
|
||||
CONFIG_DIR="/data/config"
|
||||
|
||||
VOLUME ["/data"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["freenet"]
|
Loading…
Add table
Add a link
Reference in a new issue