blob: d4104a982724b81bcdbd0c2981d70114609f1717 [file] [log] [blame]
Illyoung Choi59820ed2019-06-24 17:01:00 -07001# opencord/cord-workflow-control-service
2# To build use: docker build -t opencord/cord-workflow-control-service .
3# To run use: docker run -p 3000:3000 -d opencord/cord-workflow-control-service
4
5FROM node:10.16-alpine
6
7# Set environment variables
8ENV CODE_SOURCE .
9ENV CODE_DEST /var/www
10
11# Create app directory
12WORKDIR ${CODE_DEST}
13
14# install librdkafka
15RUN apk --no-cache add -U python make bash g++
16
17# Copy over app dependencies and source files
18COPY ${CODE_SOURCE}/package.json ${CODE_DEST}/
19COPY ${CODE_SOURCE}/src/ ${CODE_DEST}/src/
20
21# Install app dependencies and create logdir
22RUN npm install --production \
23 && mkdir ${CODE_DEST}/logs
24
25EXPOSE 3000
26
27# Label image
28ARG org_label_schema_schema_version=1.0
29ARG org_label_schema_name=cord-workflow-controller
30ARG org_label_schema_version=unknown
31ARG org_label_schema_vcs_url=unknown
32ARG org_label_schema_vcs_ref=unknown
33ARG org_label_schema_build_date=unknown
34ARG org_opencord_vcs_commit_date=unknown
35
36LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
37 org.label-schema.name=$org_label_schema_name \
38 org.label-schema.version=$org_label_schema_version \
39 org.label-schema.vcs-url=$org_label_schema_vcs_url \
40 org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
41 org.label-schema.build-date=$org_label_schema_build_date \
42 org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
43
44CMD [ "npm", "start" ]