forked from StartBootstrap/startbootstrap-resume
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile
41 lines (29 loc) · 1005 Bytes
/
Containerfile
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
38
39
40
41
FROM quay.io/almalinuxorg/9-base AS installer
RUN dnf module --assumeyes enable nodejs:18
RUN dnf install --assumeyes --setopt=install_weak_deps=false --nodocs \
git jq npm wget
RUN npm install -g npm@$(curl "https://release-monitoring.org/api/v2/versions/?project_id=190206" | jq --raw-output '.stable_versions[0]')
FROM installer AS packprovider
COPY --from=quay.io/almalinuxorg/9-micro / /rpms
RUN dnf module --assumeyes enable \
--installroot /rpms \
--releasever=9 \
nodejs:18
RUN dnf install --assumeyes --setopt=install_weak_deps=false --nodocs \
--installroot /rpms \
--releasever=9 \
nginx-core ca-certificates
RUN dnf clean all \
--installroot /rpms
FROM installer AS gitprovider
RUN mkdir /app
WORKDIR /app
COPY package.json ./
RUN npm update
COPY ./ ./
RUN npm run build
FROM quay.io/almalinuxorg/9-micro AS release
COPY --from=packprovider /rpms /
COPY --from=gitprovider /app/dist /usr/share/nginx/html
# EXPOSE 80/tcp
ENTRYPOINT [ "nginx", "-g", "daemon off;" ]