forked from paulbouwer/hello-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (24 loc) · 1.12 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
FROM node:8.1.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.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
CMD [ "npm", "start" ]