Skip to content

Commit

Permalink
Adding INSTALL_CERTS to each stage of docker build (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaliar authored Jul 25, 2023
1 parent 57dbdc3 commit 0c2e84a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ FROM ghcr.io/activeshadow/minimega/minimega:${MM_MIN_REV} AS minimega

FROM node:14.21.3 AS jsbuilder

ARG INSTALL_CERTS=
RUN ["/bin/bash", "-c", "if [ -n $INSTALL_CERTS ]; then \
IFS=',' read -r -a arr <<< $INSTALL_CERTS; \
for i in ${!arr[@]}; do \
wget ${arr[$i]} -e use_proxy=no \
-O /usr/local/share/ca-certificates/custom$i.crt; \
done && \
update-ca-certificates; \
yarn config set cafile /etc/ssl/certs/ca-certificates.crt; fi"]

RUN npm install -g @vue/cli redoc-cli

COPY ./src/js /phenix/src/js
Expand Down Expand Up @@ -84,6 +94,16 @@ RUN apt update \
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

ARG INSTALL_CERTS=
RUN ["/bin/bash", "-c", "if [ -n $INSTALL_CERTS ]; then \
IFS=',' read -r -a arr <<< $INSTALL_CERTS; \
for i in ${!arr[@]}; do \
wget ${arr[$i]} -e use_proxy=no \
-O /usr/local/share/ca-certificates/custom$i.crt; \
done && \
update-ca-certificates; \
fi"]

RUN wget https://github.com/glattercj/vmdb2/releases/download/v1.1/vmdb2 -O /usr/bin/vmdb2 \
&& chmod +x /usr/bin/vmdb2

Expand Down

0 comments on commit 0c2e84a

Please sign in to comment.