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 authored Jan 9, 2023
1 parent a85ca63 commit eff9ce3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 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"]
7 changes: 6 additions & 1 deletion build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@
the following errors:
The following artifacts could not be resolved: org.restlet.jee:org.restlet:jar:2.2.2 ...
20221230 Workaround: TLS certificates for the restlet.org maven service
expired, see the following GitHub issue for details and status updates
about workaround alternative service and target or maven.restlet.org
redirect. https://github.com/restlet/restlet-framework-java/issues/1390
-->
<repositories>
<repository>
<id>maven.restlet.org</id>
<name>maven.restlet.org</name>
<url>https://maven.restlet.org</url>
<url>https://maven.restlet.talend.com</url>
</repository>
</repositories>

Expand Down
Empty file modified docs/run-server.sh
100644 → 100755
Empty file.

0 comments on commit eff9ce3

Please sign in to comment.