Skip to content

Commit

Permalink
Standardize dependency containers
Browse files Browse the repository at this point in the history
  • Loading branch information
doganulus committed Feb 5, 2025
1 parent 2978c08 commit 524bfa7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
14 changes: 4 additions & 10 deletions containers/esmini-asam-osi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG ESMINI_BASE_IMAGE_VERSION=24.04
ARG ESMINI_BUILD_PROTOBUF_VERSION=3.15.8
ARG ESMINI_BUILD_ASAM_OSI_VERSION=3.5.0

FROM ${ESMINI_BASE_IMAGE}:${ESMINI_BASE_IMAGE_VERSION} AS esmini-asam-osi
FROM ${ESMINI_BASE_IMAGE}:${ESMINI_BASE_IMAGE_VERSION} AS esmini-asam-osi-builder
ARG TARGETARCH TARGETOS TARGETPLATFORM TARGETVARIANT

# Install predependencies
Expand All @@ -13,25 +13,16 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${TARGETPLATFORM}
apt-get install -qy --no-install-recommends \
sudo \
curl \
wget \
git \
jq \
gnupg2 \
ca-certificates \
build-essential \
cmake \
python3-minimal \
python3-pip \
pipx \
python-is-python3 \
&& \
apt-get autoremove -y && rm -rf /var/lib/apt/lists/* && \
printf "ubuntu ALL= NOPASSWD: ALL\\n" > /etc/sudoers.d/ubuntu

# Install some python utilities
RUN python3 -m pip config set global.break-system-packages true && \
PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install semver

ARG ESMINI_BUILD_PROTOBUF_VERSION
ENV ESMINI_BUILD_PROTOBUF_VERSION=${ESMINI_BUILD_PROTOBUF_VERSION}
COPY --chmod=755 scripts/protobuf-install.sh /usr/local/bin/protobuf-install.sh
Expand All @@ -41,3 +32,6 @@ ARG ESMINI_BUILD_ASAM_OSI_VERSION
ENV ESMINI_BUILD_ASAM_OSI_VERSION=${ESMINI_BUILD_ASAM_OSI_VERSION}
COPY --chmod=755 scripts/asam-osi-install.sh /usr/local/bin/asam-osi-install.sh
RUN /usr/local/bin/asam-osi-install.sh

FROM ${ESMINI_BASE_IMAGE}:${ESMINI_BASE_IMAGE_VERSION} AS esmini-asam-osi
COPY --from=esmini-asam-osi-builder /usr/local/ /usr/local/
7 changes: 5 additions & 2 deletions containers/esmini-openscenegraph/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG ESMINI_BASE_IMAGE=docker.io/library/ubuntu
ARG ESMINI_BASE_IMAGE_VERSION=24.04

FROM ${ESMINI_BASE_IMAGE}:${ESMINI_BASE_IMAGE_VERSION} AS esmini-openscenegraph
FROM ${ESMINI_BASE_IMAGE}:${ESMINI_BASE_IMAGE_VERSION} AS esmini-openscenegraph-builder
ARG TARGETARCH TARGETOS TARGETPLATFORM TARGETVARIANT

ARG ESMINI_BUILD_OSG_VERSION=latest
Expand Down Expand Up @@ -46,4 +46,7 @@ ENV ESMINI_BUILD_OSG_BUILD_SHARED_LIBS=${ESMINI_BUILD_OSG_BUILD_SHARED_LIBS}
ENV ESMINI_BUILD_OSG_BUILD_APPLICATIONS=${ESMINI_BUILD_OSG_BUILD_APPLICATIONS}

COPY --chmod=755 scripts/osg-install.sh /usr/local/bin/osg-install.sh
RUN /usr/local/bin/osg-install.sh
RUN /usr/local/bin/osg-install.sh

FROM ${ESMINI_BASE_IMAGE}:${ESMINI_BASE_IMAGE_VERSION} AS esmini-openscenegraph
COPY --from=esmini-openscenegraph-builder /usr/local/ /usr/local/

0 comments on commit 524bfa7

Please sign in to comment.