Skip to content

Commit

Permalink
update baseimage v3.3 in tii-mesh-com.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoSairiala committed Aug 29, 2024
1 parent 8328101 commit 721f686
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
build-args: |
"ARTIFACTORY_CLOUD_TOKEN=${{ secrets.ARTIFACTORY_CLOUD_TOKEN }}"
platforms: linux/amd64,linux/arm64,linux/riscv64
file: ./modules/mesh_com/Dockerfile
push: true
Expand Down
27 changes: 0 additions & 27 deletions common/tools/squid/squid.conf

This file was deleted.

29 changes: 3 additions & 26 deletions modules/mesh_com/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Given dynamically from CI job.
FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/tiiuae/fog-ros-sdk:v3.2.0-${TARGETARCH:-amd64} AS builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/tiiuae/fog-ros-sdk:v3.3.0-${TARGETARCH:-amd64} AS builder

# Must be defined another time after "FROM" keyword.
ARG TARGETARCH

# Needed for apt to authenticate with the custom private repo
ARG ARTIFACTORY_CLOUD_TOKEN
ENV ARTIFACTORY_CLOUD_TOKEN=${ARTIFACTORY_CLOUD_TOKEN}

# SRC_DIR environment variable is defined in the fog-ros-sdk image.
# The same workspace path is used by all ROS2 components.
# See: https://github.com/tiiuae/fog-ros-baseimage/blob/main/Dockerfile.sdk_builder
Expand All @@ -21,29 +17,12 @@ RUN /packaging/build_colcon_sdk.sh ${TARGETARCH:-amd64}
# ▲ runtime ──┐
# └── build ▼

FROM ghcr.io/tiiuae/fog-ros-baseimage:v3.2.0
FROM ghcr.io/tiiuae/fog-ros-baseimage:v3.3.0

ENTRYPOINT [ "/entrypoint.sh" ]

RUN apt update \
&& apt install -y --no-install-recommends squid-openssl \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /etc/squid/ssl_cert \
&& openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -extensions v3_ca -keyout /etc/squid/ssl_cert/myCA.pem -out /etc/squid/ssl_cert/myCA.pem -batch \
&& openssl x509 -in /etc/squid/ssl_cert/myCA.pem -outform PEM -out /usr/local/share/ca-certificates/squid.crt \
&& update-ca-certificates \
&& mkdir -p /var/lib/squid \
&& /usr/lib/squid/security_file_certgen -c -s /var/lib/squid/ssl_db -M 4MB

COPY common/tools/squid/ /etc/squid/

# Squid proxy needed to add Authorization: Bearer <token> header for apt to authenticate with priv repo
RUN echo "deb [trusted=yes] https://artifactory.ssrcdevops.tii.ae/artifactory/debian-public-local focal fog-sw" >> /etc/apt/sources.list \
&& sed -i "s/<token>/$ARTIFACTORY_CLOUD_TOKEN/" /etc/squid/squid.conf \
&& squid \
&& apt -o "acquire::http::proxy=http://127.0.0.1:3128" update \
&& apt -o "acquire::http::proxy=http://127.0.0.1:3128" install -y --no-install-recommends \
&& apt install -y --no-install-recommends \
alfred \
batctl \
iproute2 \
Expand All @@ -53,9 +32,7 @@ RUN echo "deb [trusted=yes] https://artifactory.ssrcdevops.tii.ae/artifactory/de
pcsc-lite \
rfkill \
wpa-supplicant=2.9-r0 \
&& pkill squid \
&& apt clean \
&& rm /etc/squid/squid.conf \
&& rm -rf /var/lib/apt/lists/*

COPY modules/mesh_com/entrypoint.sh /entrypoint.sh
Expand Down

0 comments on commit 721f686

Please sign in to comment.