From 9b8f2481215f31c1a5799b3d53c3c8582e47f059 Mon Sep 17 00:00:00 2001 From: Guy Bianco IV Date: Fri, 21 May 2021 11:55:19 -0400 Subject: [PATCH] basic Dockerfile --- todo-backend/Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 todo-backend/Dockerfile diff --git a/todo-backend/Dockerfile b/todo-backend/Dockerfile new file mode 100644 index 0000000..025dde8 --- /dev/null +++ b/todo-backend/Dockerfile @@ -0,0 +1,27 @@ +# https://github.com/sclorg/s2i-nodejs-container +FROM registry.access.redhat.com/ubi8/nodejs-14 + +LABEL version="1.0" +LABEL description="To Do List application backend" +LABEL creationDate="2017-12-25" +LABEL updatedDate="2021-05-19" + +USER 0 + +COPY . /opt/app-root/src + +RUN cd /opt/app-root/src && \ + npm install && \ + npm run build + +ENV DATABASE_SVC=192.168.0.10 +ENV DATABASE_PORT=3306 +ENV DATABASE_PASSWORD=secret-pass +ENV DATABASE_INIT=true +ENV PORT=3000 + +EXPOSE 3000 + +USER 1001 + +CMD npm start