forked from IBM/node-red-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-tools
27 lines (22 loc) · 906 Bytes
/
Dockerfile-tools
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
FROM registry.access.redhat.com/ubi8:8.5 as build
RUN dnf module install --nodocs -y nodejs:14 python39 --setopt=install_weak_deps=0 --disableplugin=subscription-manager \
&& dnf install --nodocs -y make gcc gcc-c++ --setopt=install_weak_deps=0 --disableplugin=subscription-manager \
&& dnf clean all --disableplugin=subscription-manager
RUN mkdir -p /opt/app-root/src
WORKDIR /opt/app-root/src
COPY package.json /opt/app-root/src
RUN npm install --no-audit --no-update-notifier --no-fund --production
COPY . .
ENV PORT 3000
ENV NODE_HEAPDUMP_OPTIONS nosignal
EXPOSE 3000
EXPOSE 9229
RUN mkdir -p /opt/app-root/src
WORKDIR /opt/app-root/src
COPY . /opt/app-root/src
CMD ["/bin/bash"]
ARG bx_dev_user=root
ARG bx_dev_userid=1000
RUN BX_DEV_USER=$bx_dev_user
RUN BX_DEV_USERID=$bx_dev_userid
RUN if [ "$bx_dev_user" != root ]; then useradd -ms /bin/bash -u $bx_dev_userid $bx_dev_user; fi