-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (30 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
39 lines (30 loc) · 1.04 KB
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
35
36
37
38
39
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV BUN_INSTALL=/opt/bun
ENV PATH=/opt/bun/bin:$PATH
RUN apt-get update && apt-get install -y --no-install-recommends \
openssh-server git ca-certificates curl unzip sshpass gnupg \
&& rm -rf /var/lib/apt/lists/*
# Tooling: Bun + Codex CLI
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& curl -fsSL https://bun.sh/install | bash \
&& npm i -g node-gyp @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"]