fix: various fixes

- Add uid and gid to dev user
- Entry point script is mounted and not built in docker container
- Change image name
This commit is contained in:
Ian
2026-09-29 23:38:33 +02:00
parent 14bc179526
commit 9e060a39fe
4 changed files with 64 additions and 17 deletions
+8 -2
View File
@@ -9,8 +9,9 @@ OPENCODE_VERSION=$(curl -fsSI https://github.com/anomalyco/opencode/releases/lat
NODE_VERSION=$(curl -fsSL https://nodejs.org/dist/index.json | sed -n 's/.*"version":"v\([^"]*\)".*"lts":".*".*/\1/p' | head -n 1)
IMAGE_REPO="${IMAGE_REPO:-localhost/opencode-dev}"
IMAGE_TAG="${IMAGE_TAG:-${OPENCODE_VERSION}}"
IMAGE="${IMAGE_REPO}:${IMAGE_TAG}"
# IMAGE_TAG="${IMAGE_TAG:-${OPENCODE_VERSION}}"
# IMAGE="${IMAGE_REPO}:${IMAGE_TAG}"
IMAGE="${IMAGE_REPO}"
NO_CACHE=()
if [[ "${1:-}" == "--no-cache" ]]; then
@@ -40,12 +41,17 @@ if ((UPDATE)); then
podman rmi $(podman images -q ${IMAGE_REPO})
fi
DEV_UID="$(id -u)"
DEV_GID="$(id -g)"
if [ ${DRY_RUN} == false ]; then
podman build \
"${NO_CACHE[@]}" \
--build-arg "UBUNTU_VERSION=${UBUNTU_VERSION}" \
--build-arg "OPENCODE_VERSION=${OPENCODE_VERSION}" \
--build-arg "NODE_VERSION=${NODE_VERSION}" \
--build-arg "DEV_UID=${DEV_UID}" \
--build-arg "DEV_GID=${DEV_GID}" \
-t "$IMAGE" \
.