blob: 96d1aac89ac1dbef07a939e7278e55b146e5503e [file] [log] [blame]
Zack Williamsee2e2692017-04-15 17:08:52 -07001# xosproject/xos-rest-gw
Matteo Scandolof05d8a62016-12-06 13:36:49 -08002# To build use: docker build -t xosproject/xos-rest-gw .
3# To run use: docker run -p 3000:3000 -d xosproject/xos-rest-gw
Matteo Scandoloe3ed0162016-12-01 10:09:12 -08004
5FROM node:argon
6
Zack Williamsee2e2692017-04-15 17:08:52 -07007# Label image
8ARG org_label_schema_schema_version=1.0
9ARG org_label_schema_name=xos-rest-gw
10ARG org_label_schema_version=unknown
11ARG org_label_schema_vcs_url=unknown
12ARG org_label_schema_vcs_ref=unknown
13ARG org_label_schema_build_date=unknown
14ARG org_opencord_vcs_commit_date=unknown
15
16LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
17 org.label-schema.name=$org_label_schema_name \
18 org.label-schema.version=$org_label_schema_version \
19 org.label-schema.vcs-url=$org_label_schema_vcs_url \
20 org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
21 org.label-schema.build-date=$org_label_schema_build_date \
22 org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
23
Matteo Scandoloe3ed0162016-12-01 10:09:12 -080024# Set environment variables
25ENV CODE_SOURCE .
26ENV CODE_DEST /var/www
27
28# Create app directory
29WORKDIR ${CODE_DEST}
30
31# Install app dependencies
32COPY ${CODE_SOURCE}/package.json ${CODE_DEST}
33RUN npm install --production
34
35# Bundle app source
36COPY ${CODE_SOURCE}/src ${CODE_DEST}/src
37
38# Create a folder for logs
39RUN mkdir ${CODE_DEST}/logs
40
41EXPOSE 3000
Zack Williamsee2e2692017-04-15 17:08:52 -070042CMD [ "npm", "start" ]