Initial Dosh implementation
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends openssh-server ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd -m -s /bin/sh bench \
|
||||
&& mkdir -p /var/run/sshd /home/bench/.ssh /home/bench/.local/bin \
|
||||
&& chown -R bench:bench /home/bench/.ssh /home/bench/.local
|
||||
|
||||
COPY dosh-server dosh-auth /usr/local/bin/
|
||||
COPY bench_authorized_keys /home/bench/.ssh/authorized_keys
|
||||
|
||||
RUN chmod 0755 /usr/local/bin/dosh-server /usr/local/bin/dosh-auth \
|
||||
&& chmod 0700 /home/bench/.ssh \
|
||||
&& chmod 0600 /home/bench/.ssh/authorized_keys \
|
||||
&& chown bench:bench /home/bench/.ssh/authorized_keys
|
||||
|
||||
EXPOSE 22/tcp 50000/udp
|
||||
|
||||
CMD ["/bin/sh", "-lc", "su - bench -c 'nohup /usr/local/bin/dosh-server serve >/tmp/dosh-server.log 2>&1 &' && exec /usr/sbin/sshd -D -e"]
|
||||
Reference in New Issue
Block a user