forked from paulbouwer/hello-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 1.32 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM node:13.6.0-alpine
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 image 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" ]