Skip to content

Commit 874d95f

Browse files
committed
add opencode image
1 parent 594e2ac commit 874d95f

3 files changed

Lines changed: 36 additions & 2 deletions

File tree

docker-bake.hcl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ group "default" {
1111
"sumy_0-10",
1212
"utility",
1313
"vscode-langservers",
14+
"opencode",
1415
]
1516
}
1617

@@ -107,3 +108,18 @@ target "vscode-langservers" {
107108
"LANGSERVERS_VERSION" = "4.2.1"
108109
}
109110
}
111+
112+
target "opencode" {
113+
tags = [
114+
"${registry}/opencode:latest",
115+
"${registry}/opencode:1.1.53",
116+
]
117+
dockerfile = "Dockerfile"
118+
context = "images/opencode"
119+
args = {
120+
BASE_VERSION = "3.23"
121+
OPENCODE_VERSION = "v1.1.53"
122+
OPENCODE_PACKAGE = "linux" # desktop-linux, windows, desktop-darwin, darwin
123+
OPENCODE_ARCH = "x64-musl" # aarch64, arm64, x64-musl
124+
}
125+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_VERSION=latest
2-
FROM busybox:${BASE_VERSION}
1+
ARG BASE_VERSION={{ cookiecutter.base_image_version }}
2+
FROM {{ cookiecutter.base_image }}:${BASE_VERSION}
33
ENTRYPOINT ["echo", "Hello,"]
44
CMD ["World!"]

images/opencode/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ARG BASE_VERSION=latest
2+
FROM alpine:${BASE_VERSION}
3+
4+
ARG OPENCODE_VERSION
5+
ARG OPENCODE_PACKAGE
6+
ARG OPENCODE_ARCH
7+
8+
ADD "https://github.com/anomalyco/opencode/releases/download/${OPENCODE_VERSION}/opencode-${OPENCODE_PACKAGE}-${OPENCODE_ARCH}.tar.gz" "/opencode.tar.gz"
9+
RUN tar xfz /opencode.tar.gz \
10+
&& mv /opencode /usr/local/bin/opencode \
11+
&& chmod +x /usr/local/bin/opencode \
12+
;
13+
14+
VOLUME /workdir
15+
WORKDIR /workdir
16+
17+
ENTRYPOINT ["/usr/local/bin/opencode"]
18+
CMD []

0 commit comments

Comments
 (0)