blob: 76633368bd181eb092dddb62b8d3f4afa6cfe62b [file] [log] [blame]
Zack Williamsa13f9112017-04-27 20:16:50 -07001# xosproject/xos-ws
2# To build use: docker build -t xosproject/xos-ws .
3# To run use: docker run -p 3000:3000 -d xosproject/xos-ws
Matteo Scandoloe3ed0162016-12-01 10:09:12 -08004
Matteo Scandoloea334d52017-05-09 15:08:42 -07005FROM node:7.9.0
Matteo Scandoloe3ed0162016-12-01 10:09:12 -08006
Zack Williamsa13f9112017-04-27 20:16:50 -07007# Set environment variables
8ENV CODE_SOURCE .
9ENV CODE_DEST /var/www
10
11# Create app directory
12WORKDIR ${CODE_DEST}
13
14# Copy over app dependencies and source files
15COPY ${CODE_SOURCE}/package.json ${CODE_DEST}/
16COPY ${CODE_SOURCE}/src/ ${CODE_DEST}/src/
17
18# Install app dependencies and create logdir
19RUN npm install --production \
20 && mkdir ${CODE_DEST}/logs
21
22EXPOSE 3000
23
Zack Williamsee2e2692017-04-15 17:08:52 -070024# Label image
25ARG org_label_schema_schema_version=1.0
26ARG org_label_schema_name=xos-rest-gw
27ARG org_label_schema_version=unknown
28ARG org_label_schema_vcs_url=unknown
29ARG org_label_schema_vcs_ref=unknown
30ARG org_label_schema_build_date=unknown
31ARG org_opencord_vcs_commit_date=unknown
32
33LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
34 org.label-schema.name=$org_label_schema_name \
35 org.label-schema.version=$org_label_schema_version \
36 org.label-schema.vcs-url=$org_label_schema_vcs_url \
37 org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
38 org.label-schema.build-date=$org_label_schema_build_date \
39 org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
40
Zack Williamsee2e2692017-04-15 17:08:52 -070041CMD [ "npm", "start" ]
Zack Williamsa13f9112017-04-27 20:16:50 -070042