Initial Dosh implementation
ci / test (push) Has been cancelled
ci / remote-bench (push) Has been cancelled

This commit is contained in:
Codex
2026-06-11 08:42:28 -04:00
commit 555d738a85
25 changed files with 6039 additions and 0 deletions
+21
View File
@@ -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"]
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
set -eu
repo_root="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
cd "$repo_root"
exec sh ./install.sh --from-current "$@"
+23
View File
@@ -0,0 +1,23 @@
[Unit]
Description=dosh dormant shell server
Documentation=file:README.md file:SPEC.md
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=%h/.local/bin/dosh-server serve
Restart=on-failure
RestartSec=1
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=read-only
ReadWritePaths=%h/.config/dosh %h/.local/share/dosh
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictRealtime=true
LockPersonality=true
MemoryDenyWriteExecute=true
[Install]
WantedBy=default.target