25 lines
535 B
Text
25 lines
535 B
Text
|
FROM archlinux AS builder
|
||
|
|
||
|
RUN pacman -Sy --noconfirm \
|
||
|
base-devel \
|
||
|
git
|
||
|
|
||
|
RUN curl -sSL https://sh.rustup.rs | bash -s -- -y --default-toolchain nightly
|
||
|
|
||
|
COPY . /src
|
||
|
|
||
|
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
|
||
|
|
||
|
FROM archlinux
|
||
|
|
||
|
COPY --from=builder /target/ /
|
||
|
|
||
|
RUN pacman -Sy --noconfirm curl && \
|
||
|
useradd -m -u 1000 -r nyuukyou
|
||
|
|
||
|
USER nyuukyou
|
||
|
|
||
|
ENTRYPOINT [ "/usr/local/bin/nyuukyou" ]
|
||
|
|