Skip to content

Commit

Permalink
Fix Docker container build for local dev and debugging (#1598)
Browse files Browse the repository at this point in the history
* Fix Dockerfile multi-stage builds, closes #1597.

* Add maven.restlet.org workaround.

If the TLS cert is bad, it will break local build just like
maven building Java deps in GHA.

* Fix directory safety for doctor, closes #1600.

* Somehow, docs/run-server.sh set to non-executable again.
  • Loading branch information
aj-stein-nist committed Jul 10, 2023
1 parent 9546175 commit fb8a083
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM ubuntu:22.04 as base-environment
FROM ubuntu:22.04 as oscal-os-dependencies

ENV TZ=US/Eastern
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && apt-get dist-upgrade -y

FROM base-environment as oscal-os-dependencies

RUN apt-get install -y \
apt-utils build-essential git jq libxml2-utils maven nodejs npm python3-pip unzip wget && \
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt-get update && \
apt-get dist-upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-utils build-essential git jq libxml2-utils maven nodejs npm python3-pip unzip wget && \
apt-get clean

FROM golang:1.19.4-bullseye as oscal-hugo-build
Expand Down Expand Up @@ -50,4 +47,6 @@ ENV SAXON_HOME=/opt/oscal
ENV CALABASH_HOME=${SAXON_HOME}
ENV PATH=/opt/oscal/node_modules/.bin:${PATH}

RUN git config --global --add safe.directory /oscal

ENTRYPOINT ["/bin/bash"]
Empty file modified docs/run-server.sh
100644 → 100755
Empty file.

0 comments on commit fb8a083

Please sign in to comment.