Draft incorporating firewall - audit only mode #1
1 changed files with 13 additions and 7 deletions
|
@ -1,8 +1,12 @@
|
||||||
FROM archlinux AS builder
|
FROM debian:stable-slim AS builder
|
||||||
|
|
||||||
RUN pacman -Sy --noconfirm \
|
RUN apt-get update && apt-get install -yqq --no-install-recommends \
|
||||||
base-devel \
|
build-essential \
|
||||||
git
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
pkg-config \
|
||||||
|
libssl-dev \
|
||||||
|
git
|
||||||
|
|
||||||
RUN curl -sSL https://sh.rustup.rs | bash -s -- -y --default-toolchain nightly
|
RUN curl -sSL https://sh.rustup.rs | bash -s -- -y --default-toolchain nightly
|
||||||
|
|
||||||
|
@ -11,12 +15,14 @@ COPY . /src
|
||||||
RUN cd /src && bash -c '. $HOME/.cargo/env; cargo build --release' && \
|
RUN cd /src && bash -c '. $HOME/.cargo/env; cargo build --release' && \
|
||||||
mkdir -p /target/usr/local/bin && cp /src/target/release/nyuukyou /target/usr/local/bin/nyuukyou
|
mkdir -p /target/usr/local/bin && cp /src/target/release/nyuukyou /target/usr/local/bin/nyuukyou
|
||||||
|
|
||||||
FROM archlinux
|
FROM debian:stable-slim
|
||||||
|
|
||||||
COPY --from=builder /target/ /
|
COPY --from=builder /target/ /
|
||||||
|
|
||||||
RUN pacman -Sy --noconfirm curl && \
|
RUN apt-get update && \
|
||||||
useradd -m -u 1000 -r nyuukyou
|
apt-get install -yqq --no-install-recommends openssl curl ca-certificates && \
|
||||||
|
useradd -m -u 1000 -r nyuukyou && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
USER nyuukyou
|
USER nyuukyou
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue