-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 834 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 834 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
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
git \
openssh-client \
sudo \
vim \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -s /bin/bash devuser && \
echo "devuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/devuser && \
chmod 0440 /etc/sudoers.d/devuser
USER devuser
WORKDIR /home/devuser
RUN mkdir -p /home/devuser/.config/opencode \
&& mkdir -p /home/devuser/.local/share/opencode \
&& mkdir -p /home/devuser/.ssh \
&& mkdir -p /home/devuser/.git-templates
RUN curl -fsSL https://opencode.ai/install | bash
ENV PATH="/home/devuser/.opencode/bin:/home/devuser/bin:/usr/local/bin:${PATH}"
ENV SESSIONS_DIR="/workspace/.opencode-sessions"
WORKDIR /workspace
CMD ["/bin/bash"]