Skip to content

Commit f7bdd2e

Browse files
committed
chore(docker): avoid version arg cache busting
Move the version label to the final layer so tag-specific builds can reuse previous Docker layers.
1 parent 7759f43 commit f7bdd2e

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

packages/core/src/docker/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5353
# -----------------------------------------------------------------------------
5454
FROM ubuntu:24.04 AS runtime
5555

56-
# Version passed at build time (must be after FROM to be available in this stage)
57-
# Default "dev" for local builds; CI sets actual version via --build-arg
58-
ARG OPENCODE_CLOUD_VERSION=dev
59-
6056
# OCI Labels for image metadata
6157
LABEL org.opencontainers.image.title="opencode-cloud"
6258
LABEL org.opencontainers.image.description="AI-assisted development environment with opencode"
@@ -65,8 +61,6 @@ LABEL org.opencontainers.image.source="https://github.com/pRizz/opencode-cloud"
6561
LABEL org.opencontainers.image.vendor="pRizz"
6662
LABEL org.opencontainers.image.licenses="MIT"
6763
LABEL org.opencontainers.image.base.name="ubuntu:24.04"
68-
# Version label for CLI compatibility checks (set via --build-arg OPENCODE_CLOUD_VERSION)
69-
LABEL org.opencode-cloud.version="${OPENCODE_CLOUD_VERSION}"
7064

7165
# Environment configuration
7266
ENV DEBIAN_FRONTEND=noninteractive
@@ -576,6 +570,7 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
576570
# Store version in file for runtime access (debugging, scripts)
577571
USER root
578572
ARG OPENCODE_CLOUD_VERSION=dev
573+
LABEL org.opencode-cloud.version="${OPENCODE_CLOUD_VERSION}"
579574
RUN echo "${OPENCODE_CLOUD_VERSION}" > /etc/opencode-cloud-version
580575
USER opencode
581576

0 commit comments

Comments
 (0)