-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 841 Bytes
/
Dockerfile
File metadata and controls
34 lines (25 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
openssh-server git ca-certificates nodejs npm sshpass \
&& rm -rf /var/lib/apt/lists/*
# Tooling: pnpm + Codex CLI
RUN npm i -g pnpm@10.27.0 @openai/codex
# Create non-root user for SSH
RUN useradd -m -s /bin/bash dev
# sshd runtime dir
RUN mkdir -p /run/sshd
# Harden sshd: disable password auth and root login
RUN printf "%s\n" \
"PasswordAuthentication no" \
"PermitRootLogin no" \
"PubkeyAuthentication yes" \
"AllowUsers dev" \
> /etc/ssh/sshd_config.d/dev.conf
# Workspace in dev home
RUN mkdir -p /home/dev/app && chown -R dev:dev /home/dev
COPY entrypoint.sh /entrypoint.sh
RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh
EXPOSE 22
EXPOSE 3334
ENTRYPOINT ["/entrypoint.sh"]