File tree Expand file tree Collapse file tree 5 files changed +25
-16
lines changed Expand file tree Collapse file tree 5 files changed +25
-16
lines changed Original file line number Diff line number Diff line change 77 " :pinAllExceptPeerDependencies" ,
88 " :semanticCommits" ,
99 " :semanticCommitScope(deps)" ,
10- " docker:disableMajor" ,
1110 " docker:pinDigests" ,
1211 " group:monorepos"
1312 ],
Original file line number Diff line number Diff line change 3434 - name : Setup Environment
3535 id : variables
3636 run : |-
37- git config user.name "dependency-track- bot"
38- git config user.email "dependency-track- bot@owasp .com"
37+ git config user.name "github-actions[ bot] "
38+ git config user.email "41898282+github-actions[ bot]@users.noreply.github .com"
3939
4040 npm version ${{ github.event.inputs.version-to-bump }} -m "prepare-release: set version to %s"
4141
Original file line number Diff line number Diff line change 1- FROM nginxinc/nginx-unprivileged:1.20.2 -alpine
1+ FROM nginxinc/nginx-unprivileged:1.21.6 -alpine@sha256:c754b5ff17e6cd39e786855ee31d4eeac21276d26119bf37385cbb3dcc3a9d29
22
33# Arguments that can be passed at build time
44ARG COMMIT_SHA=unknown
@@ -20,7 +20,9 @@ COPY ./dist ${APP_DIR}
2020# Ensure UID 101 & GID 0 own all the needed directories
2121# Applying these changes allows the container to run via the OpenShift default SCC "Restricted" whereby arbitrary an UID and GID=0 are assigned
2222RUN chown -R 101:0 ${APP_DIR} \
23- && chmod -R g=u ${APP_DIR}
23+ && chmod -R g=u ${APP_DIR} \
24+ # add jq to easily manipulate config.json in entrypoint script
25+ && apk --no-cache add jq
2426
2527# Specify the user to run as (in numeric format for compatibility with Kubernetes/OpenShift's SCC)
2628# Inherited from parent image
@@ -37,7 +39,7 @@ WORKDIR ${APP_DIR}
3739# metadata labels
3840LABEL \
3941 org.opencontainers.image.vendor="OWASP" \
40- org.opencontainers.image.title="Official Dependency-Track Container image" \
42+ org.opencontainers.image.title="Official Dependency-Track Frontend Container image" \
4143 org.opencontainers.image.description="Dependency-Track is an intelligent Component Analysis platform" \
4244 org.opencontainers.image.version="${APP_VERSION}" \
4345 org.opencontainers.image.url="https://dependencytrack.org/" \
Original file line number Diff line number Diff line change 1- FROM nginxinc/nginx-unprivileged:1.20.2
1+ FROM nginxinc/nginx-unprivileged:1.21.6@sha256:93bf6dcd6b4acbaf8b07a8b2fcdad73eeed54b74566ce5b4fc73b541445fb4e2
22
33# Arguments that can be passed at build time
44ARG COMMIT_SHA=unknown
@@ -20,7 +20,11 @@ COPY ./dist ${APP_DIR}
2020# Ensure UID 101 & GID 0 own all the needed directories
2121# Applying these changes allows the container to run via the OpenShift default SCC "Restricted" whereby arbitrary an UID and GID=0 are assigned
2222RUN chown -R 101:0 ${APP_DIR} \
23- && chmod -R g=u ${APP_DIR}
23+ && chmod -R g=u ${APP_DIR} \
24+ # add jq to easily manipulate config.json in entrypoint script
25+ && apt-get update -yqq \
26+ && DEBIAN_FRONTEND=noninteractive apt-get install -yqq --no-install-recommends jq \
27+ && rm -rf /var/lib/apt/lists/*
2428
2529# Specify the user to run as (in numeric format for compatibility with Kubernetes/OpenShift's SCC)
2630# Inherited from parent image
@@ -37,7 +41,7 @@ WORKDIR ${APP_DIR}
3741# metadata labels
3842LABEL \
3943 org.opencontainers.image.vendor="OWASP" \
40- org.opencontainers.image.title="Official Dependency-Track Container image" \
44+ org.opencontainers.image.title="Official Dependency-Track Frontend Container image" \
4145 org.opencontainers.image.description="Dependency-Track is an intelligent Component Analysis platform" \
4246 org.opencontainers.image.version="${APP_VERSION}" \
4347 org.opencontainers.image.url="https://dependencytrack.org/" \
Original file line number Diff line number Diff line change 66if mount | grep ' /static/config.json' ; then
77 echo " config.json is mounted from host - ENV configuration will be ignored"
88else
9- sed -i ./static/config.json \
10- -e " s;\" API_BASE_URL\" : \"\" ;\" API_BASE_URL\" : \" ${API_BASE_URL} \" ;" \
11- -e " s;\" OIDC_ISSUER\" : \"\" ;\" OIDC_ISSUER\" : \" ${OIDC_ISSUER} \" ;" \
12- -e " s;\" OIDC_CLIENT_ID\" : \"\" ;\" OIDC_CLIENT_ID\" : \" ${OIDC_CLIENT_ID} \" ;" \
13- -e " s;\" OIDC_SCOPE\" : \" openid email profile\" ;\" OIDC_SCOPE\" : \" ${OIDC_SCOPE} \" ;" \
14- -e " s;\" OIDC_FLOW\" : \" code\" ;\" OIDC_FLOW\" : \" ${OIDC_FLOW} \" ;" \
15- -e " s;\" OIDC_LOGIN_BUTTON_TEXT\" : \"\" ;\" OIDC_LOGIN_BUTTON_TEXT\" : \" ${OIDC_LOGIN_BUTTON_TEXT} \" ;"
9+ # Apply ENV vars to temporary config.json
10+ jq ' .API_BASE_URL = env.API_BASE_URL
11+ | .OIDC_ISSUER = env.OIDC_ISSUER
12+ | .OIDC_CLIENT_ID = env.OIDC_CLIENT_ID
13+ | .OIDC_SCOPE = env.OIDC_SCOPE
14+ | .OIDC_FLOW = env.OIDC_FLOW
15+ | .OIDC_LOGIN_BUTTON_TEXT = env.OIDC_LOGIN_BUTTON_TEXT' \
16+ ./static/config.json > /tmp/config.json
17+
18+ # Override default config file
19+ mv -f /tmp/config.json ./static/config.json
1620fi
1721
1822exec " $@ "
You can’t perform that action at this time.
0 commit comments