-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
50 lines (50 loc) · 1.53 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# ---------------------
# Dockerfile - Node.js
# Author: zihengCat
# Version: 1.0.0
# ---------------------
# ================================
# Using Base OS -> CentOS 7 Latest
# ================================
FROM docker.io/centos:latest
# ==========================
# MAINTAINER is `deprecated`
# ==========================
#MAINTAINER zihengCat
# =============================================
# LABEL following the standard set of labels by
# The Open Containers Initiative (OCI)
# =============================================
LABEL org.opencontainers.image.title="DockerImage - Node.js" \
org.opencontainers.image.description="A docker image contains node.js with dependencies based on CentOS 7 Linux." \
org.opencontainers.image.authors="zihengCat" \
org.opencontainers.image.version="1.0.0" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.url="https://github.com/zihengCat/docker-container-by-zihengcat"
# --------------------
# Node.js LTS 'Carbon'
# --------------------
#FROM node:carbon
# --------------------
# Create app directory
# --------------------
WORKDIR /usr/src/app
# --------------------
# Install app dependencies
# --------------------
COPY package*.json ./
RUN npm install
# --------------------
# Bundle app source
# --------------------
COPY . .
# --------------------
# Expose app port
# --------------------
EXPOSE 2233
# --------------------
# Start server
# --------------------
CMD ["npm", "run", "server"]
# --------------------
# EOF