Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
file: ${{ inputs.dockerfile }}
platforms: ${{ inputs.platform }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
VERSION=${{ steps.meta.outputs.version }}

- name: Build and Push
uses: docker/build-push-action@v6
Expand All @@ -88,6 +90,8 @@ jobs:
file: ${{ inputs.dockerfile }}
platforms: ${{ inputs.platform }}
tags: ${{ steps.meta.outputs.tags }}
build-args: |
VERSION=${{ steps.meta.outputs.version }}

- name: Summary
env:
Expand Down
2 changes: 2 additions & 0 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@

EXPOSE 8081

ARG VERSION=dev
ENV CTRLPLANE_VERSION=$VERSION
ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0
ENV AUTH_TRUST_HOST=true

Check warning on line 64 in apps/api/Dockerfile

View workflow job for this annotation

GitHub Actions / build / build

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "AUTH_TRUST_HOST") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ENV PORT=8081

WORKDIR /app/apps/api/dist/src/
Expand Down
2 changes: 2 additions & 0 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ COPY apps/web/package.json ./apps/web/package.json
RUN pnpm install --frozen-lockfile
COPY . .

ARG VERSION=dev
ENV VITE_CTRLPLANE_VERSION=$VERSION
RUN turbo build --filter=...@ctrlplane/web

RUN addgroup --system --gid 1001 nodejs
Expand Down
4 changes: 3 additions & 1 deletion apps/workspace-engine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ RUN go mod download
# Copy rest of source code
COPY . .

ARG VERSION=dev

# Build the binary with CGO enabled (required for confluent-kafka-go)
# The vendored librdkafka will be statically linked
RUN CGO_ENABLED=1 GOOS=linux go build -o engine .
RUN CGO_ENABLED=1 GOOS=linux go build -ldflags "-X workspace-engine/pkg/version.Version=$VERSION" -o engine .

# Final stage - use Debian slim for glibc compatibility
FROM debian:bookworm-slim
Expand Down
3 changes: 3 additions & 0 deletions apps/workspace-engine/pkg/version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package version

var Version = "dev"
Loading