Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docker base image builds #485

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM amazonlinux:2.0.20230307.0 as base
FROM amazonlinux:2 as base

ARG TARGETPLATFORM=linux/amd64
ARG OPENSSL_VERSION=3.0.8

###############################################################################
Expand All @@ -23,6 +24,12 @@ RUN yum -y update \
&& yum clean all \
&& rm -rf /var/cache/yum

WORKDIR /tmp
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e7797b12-ce87-4df0-aa09-df4a272fc5d9/intel-vtune-2025.0.0.1130.sh \
&& sh ./intel-vtune-2025.0.0.1130.sh -a --silent --eula accept; \
fi

###############################################################################
# Install OpenSSL 3.0.8
###############################################################################
Expand Down
32 changes: 16 additions & 16 deletions .github/docker-images/base-images/device-client/ubi8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
#https://access.redhat.com/RegistryAuthentication
FROM registry.access.redhat.com/ubi8/ubi AS base

ARG TARGETPLATFORM=linux/amd64
ARG OPENSSL_VERSION=3.0.8

###############################################################################
# Install prereqs
###############################################################################
RUN yum -y update \
&& yum -y install \
&& yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

RUN yum -y install \
tar \
bzip2 \
git \
Expand All @@ -20,16 +23,25 @@ RUN yum -y update \
gcc-c++ \
perl-IPC-Cmd \
perl-Pod-Html \
softhsm \
openssl-devel \
&& yum clean all \
&& rm -rf /var/cache/yum

WORKDIR /tmp
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e7797b12-ce87-4df0-aa09-df4a272fc5d9/intel-vtune-2025.0.0.1130.sh \
&& sh ./intel-vtune-2025.0.0.1130.sh -a --silent --eula accept; \
fi


###############################################################################
# Install pre-built CMake
###############################################################################
WORKDIR /tmp
RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.10.0/cmake-3.10.0.tar.gz -o cmake-3.10.0.tar.gz \
&& tar -zxvf cmake-3.10.0.tar.gz \
&& cd cmake-3.10.0 \
RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0.tar.gz -o cmake-3.24.0.tar.gz \
&& tar -zxvf cmake-3.24.0.tar.gz \
&& cd cmake-3.24.0 \
&& ./bootstrap \
&& make \
&& make install
Expand All @@ -45,18 +57,6 @@ RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
&& make \
&& make install

###############################################################################
# Install softhsm v2.3.0 from source
###############################################################################

WORKDIR /tmp
RUN wget https://dist.opendnssec.org/source/softhsm-2.3.0.tar.gz \
&& tar -xzf softhsm-2.3.0.tar.gz \
&& cd softhsm-2.3.0 \
&& ./configure --disable-gost \
&& make \
&& make install

###############################################################################
# Clone and build Google Test
###############################################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04 AS base
FROM ubuntu:22.04 AS base

ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -17,6 +17,7 @@ RUN apt-get update -qq \
libc6-dbg \
softhsm \
zlib1g-dev \
libssl-dev \
&& apt-get clean

###############################################################################
Expand All @@ -35,9 +36,9 @@ RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
# Install pre-built CMake
###############################################################################
WORKDIR /tmp
RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.10.0/cmake-3.10.0.tar.gz -o cmake-3.10.0.tar.gz \
&& tar -zxvf cmake-3.10.0.tar.gz \
&& cd cmake-3.10.0 \
RUN curl -sSL https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0.tar.gz -o cmake-3.24.0.tar.gz \
&& tar -zxvf cmake-3.24.0.tar.gz \
&& cd cmake-3.24.0 \
&& ./bootstrap \
&& make -j 2 \
&& make install
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM public.ecr.aws/amazonlinux/amazonlinux:2.0.20230307.0

FROM public.ecr.aws/amazonlinux/amazonlinux:2
ARG OPENSSL_VERSION=3.0.8

RUN yum -y update && yum -y install \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

ARG OPENSSL_VERSION=3.0.8

Expand All @@ -10,7 +10,8 @@ RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libtool \
zlib1g-dev
zlib1g-dev \
libssl-dev

RUN mkdir /openssl && cd /openssl && wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
&& tar -zxvf openssl-${OPENSSL_VERSION}.tar.gz \
Expand Down
79 changes: 5 additions & 74 deletions .github/workflows/base-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Base Image Builds

on:
push:
branches: ['base-images']
branches: ['base-images', 'main']
pull_request:
branches: ['base-images']
types: [opened, closed]
Expand Down Expand Up @@ -93,43 +93,6 @@ jobs:
tags: |
public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-ubuntu-latest
platforms: linux/arm64
build-base-docker-image-ubuntu-armv7:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ECR_USER_AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ECR_USER_AWS_KEY_SECRET }}
aws-region: us-east-1
- name: Login to ECR
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: public.ecr.aws/${{ env.ECR_REPO }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build ubuntu Base Image
uses: docker/build-push-action@v3
with:
file: .github/docker-images/base-images/device-client/ubuntu/Dockerfile
context: .
target: base
push: true
tags: |
public.ecr.aws/${{ env.ECR_BASE_REPO }}:armv7-ubuntu-latest
platforms: linux/arm/v7
build-integration-test-base-docker-image-ubuntu-x86_64:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -202,42 +165,6 @@ jobs:
tags: |
public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}:aarch64-ubuntu-latest
platforms: linux/amd64
build-integration-test-base-docker-image-ubuntu-armv7:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ECR_USER_AWS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ECR_USER_AWS_KEY_SECRET }}
aws-region: us-east-1
- name: Login to ECR
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Ubuntu Base Image
uses: docker/build-push-action@v3
with:
file: .github/docker-images/base-images/integration-tests/ubuntu/Dockerfile
context: .
push: true
tags: |
public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}:armv7-ubuntu-latest
platforms: linux/arm/v7
build-base-docker-image-amazonlinux-x86_64:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -307,6 +234,8 @@ jobs:
with:
file: .github/docker-images/base-images/device-client/amazonlinux/Dockerfile
context: .
build-args: |
TARGETPLATFORM=linux/arm64
target: base
push: true
tags: |
Expand Down Expand Up @@ -453,6 +382,8 @@ jobs:
with:
file: .github/docker-images/base-images/device-client/ubi8/Dockerfile
context: .
build-args: |
TARGETPLATFORM=linux/arm64
target: base
push: true
tags: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/e2e-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
context: .
target: deploy
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-ubuntu-latest
push: false
- name: Get Version
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-ubuntu-latest
push: true
tags: |
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-ubuntu-latest
push: true
tags: |
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:armv7-ubuntu-latest
push: true
tags: |
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=amazonlinux:2022.0.20221207.4
OS=amazonlinux:2
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-amazonlinux-latest
push: true
tags: |
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=amazonlinux:2022.0.20221207.4
OS=amazonlinux:2
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-amazonlinux-latest
push: true
tags: |
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:
file: .github/docker-images/integration-tests/ubuntu/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
PRE_RELEASE_IMAGE=public.ecr.aws/${{ env.ECR_PRE_RELEASE_REPO }}:x86_64-ubuntu-${{ needs.versioning.outputs.version }}
BASE_IMAGE=public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}:x86_64-ubuntu-latest
push: true
Expand Down Expand Up @@ -401,7 +401,7 @@ jobs:
file: .github/docker-images/integration-tests/ubuntu/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
PRE_RELEASE_IMAGE=public.ecr.aws/${{ env.ECR_PRE_RELEASE_REPO }}:aarch64-ubuntu-${{ needs.versioning.outputs.version }}
BASE_IMAGE=public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}:aarch64-ubuntu-latest
push: true
Expand Down Expand Up @@ -444,7 +444,7 @@ jobs:
file: .github/docker-images/integration-tests/ubuntu/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
PRE_RELEASE_IMAGE=public.ecr.aws/${{ env.ECR_PRE_RELEASE_REPO }}:armv7-ubuntu-${{ needs.versioning.outputs.version }}
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:armv7-ubuntu-latest
push: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
context: .
target: deploy
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-ubuntu-latest
push: false
- name: Get Version
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-ubuntu-latest
push: true
tags: |
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-ubuntu-latest
push: true
tags: |
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=ubuntu:18.04
OS=ubuntu:22.04
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:armv7-ubuntu-latest
push: true
tags: |
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=amazonlinux:latest
OS=amazonlinux:2
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-amazonlinux-latest
push: true
tags: |
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
file: .github/docker-images/Dockerfile
context: .
build-args: |
OS=amazonlinux:latest
OS=amazonlinux:2
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-amazonlinux-latest
push: true
tags: |
Expand Down
Loading