Skip to content

Commit 2dbad96

Browse files
committed
add gh cli to opencode image
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent d89d66e commit 2dbad96

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

opencode/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2121
ca-certificates \
2222
curl \
2323
bash \
24+
wget \
25+
&& rm -rf /var/lib/apt/lists/*
26+
27+
# Install GitHub CLI
28+
RUN (type -p wget >/dev/null || (apt-get update && apt-get install wget -y)) \
29+
&& mkdir -p -m 755 /etc/apt/keyrings \
30+
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
31+
&& cat $out | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
32+
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
33+
&& mkdir -p -m 755 /etc/apt/sources.list.d \
34+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
35+
&& apt-get update \
36+
&& apt-get install gh -y \
2437
&& rm -rf /var/lib/apt/lists/*
2538

2639
# Install opencode and capture the installation location

0 commit comments

Comments
 (0)