-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (36 loc) · 1.47 KB
/
Dockerfile
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
28
29
30
31
32
33
34
35
36
37
# Parent images are:
# https://pkgs.devel.redhat.com/cgit/containers/s2i-core/tree/Dockerfile?h=rhel-8.5.0
# http://pkgs.devel.redhat.com/cgit/containers/nodejs-14/tree/Dockerfile?h=rhel-8.5.0
#
# Find brew container builds at:
# https://brewweb.engineering.redhat.com/brew/search?match=glob&type=build&terms=*nodejs-14*
#
# Take s2i image
# Do not follow s2i convinience, because:
# * s2i mainly targets openshift, can be used only in specific workflows
# * s2i introduces new dependencies to code location
# * s2i requires additional tools for image build
# * s2i is vendor-lock for s2i images
# * build image with buildah is simple and convinient, and universal
# * use full benefits of RedHat images, but build images in simple form
#
# NPM_RUN - Select an alternate / custom runtime mode, defined in your package.json files' scripts section:
# * start:listener
# * start:loader
# http://pkgs.devel.redhat.com/cgit/containers/nodejs-14/tree/Dockerfile?h=rhel-8.5.0#n15
FROM registry.access.redhat.com/ubi8/nodejs-14
USER root
ARG ADDPKGS
RUN yum install -y krb5-workstation $ADDPKGS && \
yum clean all -y
COPY rhcachain.crt "$HOME/"
RUN trust anchor --store "${HOME}/rhcachain.crt"
USER 1001
COPY src $HOME/src/
COPY assets $HOME/assets/
COPY package.json package-lock.json env.sh tsconfig.json $HOME/
COPY .npmrcs/$NPMLOCATION .npmrc
ARG NPMLOCATION="open"
RUN ["bash","-c", "--", "npm install"]
RUN ["bash","-c", "--", "npm run build"]
CMD ["bash","-c", "--", "$STI_SCRIPTS_PATH/run"]