-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.server
More file actions
46 lines (35 loc) · 1.03 KB
/
Copy pathDockerfile.server
File metadata and controls
46 lines (35 loc) · 1.03 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
40
41
42
43
44
45
46
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
vim \
ca-certificates \
openssh-client \
curl \
unzip \
gnupg \
sudo \
git \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y glab \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g opencode-ai@latest
RUN npm install -g bmad-opencode-converter
RUN useradd -m -s /bin/bash -G sudo opencode \
&& echo "opencode ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/opencode \
&& chmod 0440 /etc/sudoers.d/opencode
USER opencode
ENV HOME=/home/opencode
WORKDIR /home/opencode
RUN mkdir -p /home/opencode/.ssh \
/home/opencode/.local/share/opencode \
/home/opencode/.local/state/opencode \
/home/opencode/.config/opencode
ENV PATH="/home/opencode/.opencode/bin:${PATH}"
ENV NODE_NO_WARNINGS=1
EXPOSE 4096
ENTRYPOINT ["opencode"]
CMD ["serve", "--port", "4096", "--hostname", "0.0.0.0"]