|
@ -0,0 +1,28 @@ |
|
|
|
|
|
ARG ALPINE_VERSION=3.13 |
|
|
|
|
|
|
|
|
|
|
|
FROM alpine:$ALPINE_VERSION AS builder |
|
|
|
|
|
ARG RUST_VERSION=stable |
|
|
|
|
|
ARG PIJUL_VERSION="~1.0.0-alpha" |
|
|
|
|
|
|
|
|
|
|
|
RUN apk add --no-cache rustup \ |
|
|
|
|
|
&& rustup-init -yqt "$RUST_VERSION" |
|
|
|
|
|
RUN apk add --no-cache \ |
|
|
|
|
|
build-base \ |
|
|
|
|
|
clang \ |
|
|
|
|
|
libsodium-dev \ |
|
|
|
|
|
make \ |
|
|
|
|
|
openssl-dev \ |
|
|
|
|
|
xxhash-dev \ |
|
|
|
|
|
zstd-dev |
|
|
|
|
|
RUN /root/.cargo/bin/cargo install pijul --version "$PIJUL_VERSION" |
|
|
|
|
|
|
|
|
|
|
|
FROM alpine:$ALPINE_VERSION AS base |
|
|
|
|
|
LABEL maintainer "Drew Short - https://git.nulloctet.com/warricksothr" |
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"] |
|
|
|
|
|
EXPOSE 22 |
|
|
|
|
|
COPY --from=builder /root/.cargo/bin/pijul /usr/local/bin/ |
|
|
|
|
|
COPY rootfs / |
|
|
|
|
|
|
|
|
|
|
|
RUN apk add --no-cache openssh \ |
|
|
|
|
|
&& sed -i s/#PermitRootLogin.*/PermitRootLogin\ no/ /etc/ssh/sshd_config \ |
|
|
|
|
|
&& echo "root:root" | chpasswd |