Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: chainguard node23 is a no, so... distroless? #1684

Merged
merged 2 commits into from
Jan 17, 2025
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
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# Any other changes to Dockerfile should be reflected in Publish

# crane digest cgr.dev/chainguard/node-lts:latest-dev
FROM cgr.dev/chainguard/node:latest-dev@sha256:96260affdd273eb612d5fa031b8230cde59e06e21cdaf67f85a8f6399abd889a AS build
# cgr.dev/chainguard/node:latest-dev@sha256:96260affdd273eb612d5fa031b8230cde59e06e21cdaf67f85a8f6399abd889a
FROM docker.io/library/node:22-bookworm AS build

WORKDIR /app

Expand Down Expand Up @@ -38,7 +39,9 @@ RUN npm run build && \
##### DELIVER #####

# crane digest cgr.dev/chainguard/node-lts:latest
FROM cgr.dev/chainguard/node:latest@sha256:f771505c29d1f766c1dc4d3b2ed0f8660a76553685b9d886728bc55d6f430ce8
# cgr.dev/chainguard/node:latest@sha256:f771505c29d1f766c1dc4d3b2ed0f8660a76553685b9d886728bc55d6f430ce8
# gcr.io/distroless/nodejs22-debian12@sha256:d00edbf864c5b989f1b69951a13c5c902bf369cca572de59b5ec972552848e33
FROM gcr.io/distroless/nodejs22-debian12:nonroot@sha256:06298f87531dfff6dd2bc6b573095162d25f7e5583abbc865bfcdf45a4fbee16

WORKDIR /app

Expand Down
9 changes: 6 additions & 3 deletions Dockerfile.kfc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# Any other changes to Dockerfile should be reflected in Publish

# crane digest cgr.dev/chainguard/node-lts:latest-dev
FROM cgr.dev/chainguard/node:latest-dev@sha256:96260affdd273eb612d5fa031b8230cde59e06e21cdaf67f85a8f6399abd889a AS build
# cgr.dev/chainguard/node:latest-dev@sha256:96260affdd273eb612d5fa031b8230cde59e06e21cdaf67f85a8f6399abd889a
FROM docker.io/library/node:22-bookworm@@sha256:fa54405993eaa6bab6b6e460f5f3e945a2e2f07942ba31c0e297a7d9c2041f62 AS build

WORKDIR /app

Expand Down Expand Up @@ -46,8 +47,10 @@ RUN cp -r kubernetes-fluent-client/src node_modules/kubernetes-fluent-client/src
##### DELIVER #####

# crane digest cgr.dev/chainguard/node-lts:latest
FROM cgr.dev/chainguard/node:latest@sha256:f771505c29d1f766c1dc4d3b2ed0f8660a76553685b9d886728bc55d6f430ce8
# cgr.dev/chainguard/node:latest@sha256:f771505c29d1f766c1dc4d3b2ed0f8660a76553685b9d886728bc55d6f430ce8
# gcr.io/distroless/nodejs22-debian12@sha256:d00edbf864c5b989f1b69951a13c5c902bf369cca572de59b5ec972552848e33
FROM gcr.io/distroless/nodejs22-debian12:nonroot@sha256:06298f87531dfff6dd2bc6b573095162d25f7e5583abbc865bfcdf45a4fbee16

WORKDIR /app

COPY --from=build --chown=node:node /app/node_modules/ ./node_modules/
COPY --from=build --chown=nonroot:nonroot /app/node_modules/ ./node_modules/
6 changes: 2 additions & 4 deletions src/lib/assets/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ export function watcherDeployTemplate(buildTimestamp: string): string {
- name: {{ . }}
{{- end }}
{{- end }}
command:
- node
args:
- /app/node_modules/pepr/dist/controller.js
- {{ .Values.hash }}
readinessProbe:
Expand Down Expand Up @@ -195,8 +194,7 @@ export function admissionDeployTemplate(buildTimestamp: string): string {
- name: {{ . }}
{{- end }}
{{- end }}
command:
- node
args:
- /app/node_modules/pepr/dist/controller.js
- {{ .Values.hash }}
readinessProbe:
Expand Down
4 changes: 2 additions & 2 deletions src/lib/assets/pods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function getWatcher(
name: "watcher",
image,
imagePullPolicy: "IfNotPresent",
command: ["node", "/app/node_modules/pepr/dist/controller.js", hash],
args: ["/app/node_modules/pepr/dist/controller.js", hash],
readinessProbe: {
httpGet: {
path: "/healthz",
Expand Down Expand Up @@ -248,7 +248,7 @@ export function getDeployment(
name: "server",
image,
imagePullPolicy: "IfNotPresent",
command: ["node", "/app/node_modules/pepr/dist/controller.js", hash],
args: ["/app/node_modules/pepr/dist/controller.js", hash],
readinessProbe: {
httpGet: {
path: "/healthz",
Expand Down
Loading