forked from paulbouwer/hello-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed base container image to Wolfi
- Loading branch information
Showing
1 changed file
with
19 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,19 @@ | ||
FROM node:16-alpine3.13 | ||
|
||
ARG IMAGE_CREATE_DATE | ||
ARG IMAGE_VERSION | ||
ARG IMAGE_SOURCE_REVISION | ||
|
||
# Metadata as defined in OCI image spec annotations - https://github.com/opencontainers/image-spec/blob/master/annotations.md | ||
LABEL org.opencontainers.image.title="Hello Kubernetes!" \ | ||
org.opencontainers.image.description="Provides a demo app to deploy to a Kubernetes cluster. It displays a message, the name of the pod and details of the node it is deployed to." \ | ||
org.opencontainers.image.created=$IMAGE_CREATE_DATE \ | ||
org.opencontainers.image.version=$IMAGE_VERSION \ | ||
org.opencontainers.image.authors="Paul Bouwer" \ | ||
org.opencontainers.image.url="https://hub.docker.com/r/paulbouwer/hello-kubernetes/" \ | ||
org.opencontainers.image.documentation="https://github.com/paulbouwer/hello-kubernetes/README.md" \ | ||
org.opencontainers.image.vendor="Paul Bouwer" \ | ||
org.opencontainers.image.licenses="MIT" \ | ||
org.opencontainers.image.source="https://github.com/paulbouwer/hello-kubernetes.git" \ | ||
org.opencontainers.image.revision=$IMAGE_SOURCE_REVISION | ||
|
||
# Create app directory | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# Install app dependencies | ||
COPY package.json /usr/src/app/ | ||
RUN npm install | ||
|
||
# Bundle app source | ||
COPY . /usr/src/app | ||
|
||
USER node | ||
CMD [ "npm", "start" ] | ||
FROM cgr.dev/chainguard/wolfi-base | ||
|
||
ARG version=3.11 | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
RUN apk update && apk add nodejs && apk add npm | ||
|
||
COPY package.json /usr/src/app/ | ||
RUN npm install | ||
|
||
COPY . /usr/src/app | ||
|
||
ENV PORT 5000 | ||
|
||
USER nonroot | ||
CMD [ "npm", "start" ] | ||
|