forked from paulbouwer/hello-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
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 EKS!" \
org.opencontainers.image.description="Provides a demo image to deploy to an EKS cluster. It displays a message, the name of the pod and details of the node/EC2 instance it is deployed to." \
org.opencontainers.image.created=$IMAGE_CREATE_DATE \
org.opencontainers.image.version=$IMAGE_VERSION \
org.opencontainers.image.authors="Marcelo Boeira" \
org.opencontainers.image.url="https://hub.docker.com/r/marceloboeira/hello-eks/" \
org.opencontainers.image.documentation="https://github.com/marceloboeira/hello-eks/README.md" \
org.opencontainers.image.vendor="Marcelo Boeira" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://github.com/marceloboeira/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" ]