Browse Source

Initial build image

master
Drew Short 4 years ago
commit
efacc7e3d4
  1. 28
      Dockerfile
  2. 7
      rootfs/entrypoint.sh

28
Dockerfile

@ -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

7
rootfs/entrypoint.sh

@ -0,0 +1,7 @@
#!/bin/ash
# generate host keys if not present
ssh-keygen -A
# do not detach (-D), log to stderr (-e), passthrough other arguments
exec /usr/sbin/sshd -D -e "$@"
Loading…
Cancel
Save