fix: reduce permissions and fix npm and opencode versions

This commit is contained in:
Ian
2026-10-01 23:22:33 +02:00
parent c64bbe5336
commit 7b98d6dae6
4 changed files with 33 additions and 33 deletions
+3 -1
View File
@@ -6,7 +6,8 @@ cd "$SCRIPT_DIR"
UBUNTU_VERSION="${UBUNTU_VERSION:-26.04}"
# OPENCODE_VERSION=$(curl -fsSI https://github.com/anomalyco/opencode/releases/latest | sed -n 's/^location:.*\/tag\/v\{0,1\}\(.*\)\r$/\1/ip')
NODE_VERSION=$(curl -fsSL https://nodejs.org/dist/index.json | sed -n 's/.*"version":"v\([^"]*\)".*"lts":".*".*/\1/p' | head -n 1)
NODE_VERSION="${NODE_VERSION:-24.21.0}"
OPENCODE_VERSION="${OPENCODE_VERSION:-2.0.3}"
IMAGE_REPO="${IMAGE_REPO:-localhost/opencode-dev}"
# IMAGE_TAG="${IMAGE_TAG:-${OPENCODE_VERSION}}"
@@ -49,6 +50,7 @@ if [ ${DRY_RUN} == false ]; then
"${NO_CACHE[@]}" \
--build-arg "UBUNTU_VERSION=${UBUNTU_VERSION}" \
--build-arg "NODE_VERSION=${NODE_VERSION}" \
--build-arg "OPENCODE_VERSION=${OPENCODE_VERSION}" \
--build-arg "DEV_UID=${DEV_UID}" \
--build-arg "DEV_GID=${DEV_GID}" \
-t "$IMAGE" \