Skip to content

Commit

Permalink
Switch to Node for final image, install oscaljs
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-stein-gsa committed Sep 7, 2024
1 parent edef8c5 commit b7d92af
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
ARG GIT_IMAGE=bitnami/git:2.46.0
ARG MAVEN_IMAGE=maven:3.9.9-eclipse-temurin-22-alpine
ARG NODE_IMAGE=node:22-alpine3.20
ARG TEMURIN_APK_KEY_URL=https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk
ARG TEMURIN_APK_REPO_URL=https://packages.adoptium.net/artifactory/apk/alpine/main
ARG TEMURIN_APK_VERSION=temurin-22-jdk
ARG MAVEN_DEP_PLUGIN_VERSION=3.8.0
ARG OSCAL_CLI_VERSION=2.0.2
ARG OSCAL_JS_VERSION=1.4.4
ARG FEDRAMP_AUTO_GIT_URL=https://github.com/GSA/fedramp-automation.git
ARG FEDRAMP_AUTO_GIT_REF=feature/external-constraints

Expand Down Expand Up @@ -37,10 +44,14 @@ LABEL org.opencontainers.image.vendor="GSA Technology Transformation Services"
LABEL org.opencontainers.image.title="FedRAMP Validation Tools"
LABEL org.opencontainers.image.description="FedRAMP's tools for validating OSCAL data"
LABEL org.opencontainers.image.licenses="CC0-1.0"
ARG OSCAL_CLI_INSTALL_PATH
COPY --from=cli_downloader /opt/oscal-cli /opt/
RUN mkdir -p /opt/fedramp/constraints
COPY --from=fedramp_data_downloader /usr/local/src/fedramp-automation/src/validations/constraints/*.xml /opt/fedramp/constraints
ENV PATH="$PATH:/opt/oscal-cli/bin"
WORKDIR /app
COPY --from=oscal_cli_downloader /opt/oscal-cli /opt/oscal-cli
COPY --from=fedramp_data_downloader /usr/local/src/fedramp-automation/src/validations/constraints/*.xml /opt/fedramp/constraints/
RUN wget -O /etc/apk/keys/adoptium.rsa.pub "${TEMURIN_APK_KEY_URL}" && \
echo "${TEMURIN_APK_REPO_URL}" >> /etc/apk/repositories && \
apk add --no-cache ${TEMURIN_APK_VERSION} && \
mkdir -p /opt/fedramp/oscaljs && \
mkdir -p /opt/fedramp/constraints && \
(cd /opt/fedramp/oscaljs && npm install oscal@${OSCAL_JS_VERSION})
ENV PATH="$PATH:/opt/oscal-cli/bin:/opt/fedramp/oscaljs/node_modules/.bin"
WORKDIR /opt/fedramp/constraints
ENTRYPOINT [ "/opt/oscal-cli/bin/oscal-cli" ]

0 comments on commit b7d92af

Please sign in to comment.