Skip to content

Commit fb8a083

Browse files
committed
Fix Docker container build for local dev and debugging (#1598)
* 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.
1 parent 9546175 commit fb8a083

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

build/Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
FROM ubuntu:22.04 as base-environment
1+
FROM ubuntu:22.04 as oscal-os-dependencies
22

33
ENV TZ=US/Eastern
4-
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5-
6-
RUN apt-get update && apt-get dist-upgrade -y
7-
8-
FROM base-environment as oscal-os-dependencies
9-
10-
RUN apt-get install -y \
11-
apt-utils build-essential git jq libxml2-utils maven nodejs npm python3-pip unzip wget && \
4+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
5+
apt-get update && \
6+
apt-get dist-upgrade -y && \
7+
DEBIAN_FRONTEND=noninteractive apt-get install -y \
8+
apt-utils build-essential git jq libxml2-utils maven nodejs npm python3-pip unzip wget && \
129
apt-get clean
1310

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

50+
RUN git config --global --add safe.directory /oscal
51+
5352
ENTRYPOINT ["/bin/bash"]

docs/run-server.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)