Skip to content

Commit 8ca0ddd

Browse files
fix docker base image builds (#485)
* build base images upon push to main * fix ubuntu base build * fix amazonlinux and ubi8 base builds * fix arm docker builds * fix syntax * fix typo
1 parent ffd00f6 commit 8ca0ddd

8 files changed

Lines changed: 53 additions & 114 deletions

File tree

.github/docker-images/base-images/device-client/amazonlinux/Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
FROM amazonlinux:2.0.20230307.0 as base
1+
FROM amazonlinux:2 as base
22

3+
ARG TARGETPLATFORM=linux/amd64
34
ARG OPENSSL_VERSION=3.0.8
45

56
###############################################################################
@@ -23,6 +24,12 @@ RUN yum -y update \
2324
&& yum clean all \
2425
&& rm -rf /var/cache/yum
2526

27+
WORKDIR /tmp
28+
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
29+
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e7797b12-ce87-4df0-aa09-df4a272fc5d9/intel-vtune-2025.0.0.1130.sh \
30+
&& sh ./intel-vtune-2025.0.0.1130.sh -a --silent --eula accept; \
31+
fi
32+
2633
###############################################################################
2734
# Install OpenSSL 3.0.8
2835
###############################################################################

.github/docker-images/base-images/device-client/ubi8/Dockerfile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
#https://access.redhat.com/RegistryAuthentication
33
FROM registry.access.redhat.com/ubi8/ubi AS base
44

5+
ARG TARGETPLATFORM=linux/amd64
56
ARG OPENSSL_VERSION=3.0.8
67

78
###############################################################################
89
# Install prereqs
910
###############################################################################
1011
RUN yum -y update \
11-
&& yum -y install \
12+
&& yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
13+
14+
RUN yum -y install \
1215
tar \
1316
bzip2 \
1417
git \
@@ -20,16 +23,25 @@ RUN yum -y update \
2023
gcc-c++ \
2124
perl-IPC-Cmd \
2225
perl-Pod-Html \
26+
softhsm \
27+
openssl-devel \
2328
&& yum clean all \
2429
&& rm -rf /var/cache/yum
2530

31+
WORKDIR /tmp
32+
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
33+
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e7797b12-ce87-4df0-aa09-df4a272fc5d9/intel-vtune-2025.0.0.1130.sh \
34+
&& sh ./intel-vtune-2025.0.0.1130.sh -a --silent --eula accept; \
35+
fi
36+
37+
2638
###############################################################################
2739
# Install pre-built CMake
2840
###############################################################################
2941
WORKDIR /tmp
30-
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 \
31-
&& tar -zxvf cmake-3.10.0.tar.gz \
32-
&& cd cmake-3.10.0 \
42+
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 \
43+
&& tar -zxvf cmake-3.24.0.tar.gz \
44+
&& cd cmake-3.24.0 \
3345
&& ./bootstrap \
3446
&& make \
3547
&& make install
@@ -45,18 +57,6 @@ RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
4557
&& make \
4658
&& make install
4759

48-
###############################################################################
49-
# Install softhsm v2.3.0 from source
50-
###############################################################################
51-
52-
WORKDIR /tmp
53-
RUN wget https://dist.opendnssec.org/source/softhsm-2.3.0.tar.gz \
54-
&& tar -xzf softhsm-2.3.0.tar.gz \
55-
&& cd softhsm-2.3.0 \
56-
&& ./configure --disable-gost \
57-
&& make \
58-
&& make install
59-
6060
###############################################################################
6161
# Clone and build Google Test
6262
###############################################################################

.github/docker-images/base-images/device-client/ubuntu/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04 AS base
1+
FROM ubuntu:22.04 AS base
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

@@ -17,6 +17,7 @@ RUN apt-get update -qq \
1717
libc6-dbg \
1818
softhsm \
1919
zlib1g-dev \
20+
libssl-dev \
2021
&& apt-get clean
2122

2223
###############################################################################
@@ -35,9 +36,9 @@ RUN wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
3536
# Install pre-built CMake
3637
###############################################################################
3738
WORKDIR /tmp
38-
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 \
39-
&& tar -zxvf cmake-3.10.0.tar.gz \
40-
&& cd cmake-3.10.0 \
39+
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 \
40+
&& tar -zxvf cmake-3.24.0.tar.gz \
41+
&& cd cmake-3.24.0 \
4142
&& ./bootstrap \
4243
&& make -j 2 \
4344
&& make install

.github/docker-images/base-images/integration-tests/amazonlinux/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FROM public.ecr.aws/amazonlinux/amazonlinux:2.0.20230307.0
2-
1+
FROM public.ecr.aws/amazonlinux/amazonlinux:2
32
ARG OPENSSL_VERSION=3.0.8
43

54
RUN yum -y update && yum -y install \

.github/docker-images/base-images/integration-tests/ubuntu/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:22.04
22

33
ARG OPENSSL_VERSION=3.0.8
44

@@ -10,7 +10,8 @@ RUN apt-get update && apt-get install -y \
1010
build-essential \
1111
cmake \
1212
libtool \
13-
zlib1g-dev
13+
zlib1g-dev \
14+
libssl-dev
1415

1516
RUN mkdir /openssl && cd /openssl && wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
1617
&& tar -zxvf openssl-${OPENSSL_VERSION}.tar.gz \

.github/workflows/base-images.yml

Lines changed: 5 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: Base Image Builds
77

88
on:
99
push:
10-
branches: ['base-images']
10+
branches: ['base-images', 'main']
1111
pull_request:
1212
branches: ['base-images']
1313
types: [opened, closed]
@@ -93,43 +93,6 @@ jobs:
9393
tags: |
9494
public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-ubuntu-latest
9595
platforms: linux/arm64
96-
build-base-docker-image-ubuntu-armv7:
97-
runs-on: ubuntu-latest
98-
permissions:
99-
id-token: write
100-
contents: read
101-
steps:
102-
- name: Configure AWS Credentials
103-
uses: aws-actions/configure-aws-credentials@v1
104-
with:
105-
aws-access-key-id: ${{ secrets.ECR_USER_AWS_KEY_ID }}
106-
aws-secret-access-key: ${{ secrets.ECR_USER_AWS_KEY_SECRET }}
107-
aws-region: us-east-1
108-
- name: Login to ECR
109-
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
110-
- name: Checkout
111-
uses: actions/checkout@v2
112-
with:
113-
fetch-depth: 0
114-
- name: Set up QEMU
115-
uses: docker/setup-qemu-action@v2
116-
- name: Docker meta
117-
id: meta
118-
uses: docker/metadata-action@v4
119-
with:
120-
images: public.ecr.aws/${{ env.ECR_REPO }}
121-
- name: Set up Docker Buildx
122-
uses: docker/setup-buildx-action@v2
123-
- name: Build ubuntu Base Image
124-
uses: docker/build-push-action@v3
125-
with:
126-
file: .github/docker-images/base-images/device-client/ubuntu/Dockerfile
127-
context: .
128-
target: base
129-
push: true
130-
tags: |
131-
public.ecr.aws/${{ env.ECR_BASE_REPO }}:armv7-ubuntu-latest
132-
platforms: linux/arm/v7
13396
build-integration-test-base-docker-image-ubuntu-x86_64:
13497
runs-on: ubuntu-latest
13598
permissions:
@@ -202,42 +165,6 @@ jobs:
202165
tags: |
203166
public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}:aarch64-ubuntu-latest
204167
platforms: linux/amd64
205-
build-integration-test-base-docker-image-ubuntu-armv7:
206-
runs-on: ubuntu-latest
207-
permissions:
208-
id-token: write
209-
contents: read
210-
steps:
211-
- name: Configure AWS Credentials
212-
uses: aws-actions/configure-aws-credentials@v1
213-
with:
214-
aws-access-key-id: ${{ secrets.ECR_USER_AWS_KEY_ID }}
215-
aws-secret-access-key: ${{ secrets.ECR_USER_AWS_KEY_SECRET }}
216-
aws-region: us-east-1
217-
- name: Login to ECR
218-
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
219-
- name: Checkout
220-
uses: actions/checkout@v2
221-
with:
222-
fetch-depth: 0
223-
- name: Set up QEMU
224-
uses: docker/setup-qemu-action@v2
225-
- name: Docker meta
226-
id: meta
227-
uses: docker/metadata-action@v4
228-
with:
229-
images: public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}
230-
- name: Set up Docker Buildx
231-
uses: docker/setup-buildx-action@v2
232-
- name: Build Ubuntu Base Image
233-
uses: docker/build-push-action@v3
234-
with:
235-
file: .github/docker-images/base-images/integration-tests/ubuntu/Dockerfile
236-
context: .
237-
push: true
238-
tags: |
239-
public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}:armv7-ubuntu-latest
240-
platforms: linux/arm/v7
241168
build-base-docker-image-amazonlinux-x86_64:
242169
runs-on: ubuntu-latest
243170
permissions:
@@ -307,6 +234,8 @@ jobs:
307234
with:
308235
file: .github/docker-images/base-images/device-client/amazonlinux/Dockerfile
309236
context: .
237+
build-args: |
238+
TARGETPLATFORM=linux/arm64
310239
target: base
311240
push: true
312241
tags: |
@@ -453,6 +382,8 @@ jobs:
453382
with:
454383
file: .github/docker-images/base-images/device-client/ubi8/Dockerfile
455384
context: .
385+
build-args: |
386+
TARGETPLATFORM=linux/arm64
456387
target: base
457388
push: true
458389
tags: |

.github/workflows/e2e-ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
context: .
4949
target: deploy
5050
build-args: |
51-
OS=ubuntu:18.04
51+
OS=ubuntu:22.04
5252
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-ubuntu-latest
5353
push: false
5454
- name: Get Version
@@ -87,7 +87,7 @@ jobs:
8787
file: .github/docker-images/Dockerfile
8888
context: .
8989
build-args: |
90-
OS=ubuntu:18.04
90+
OS=ubuntu:22.04
9191
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-ubuntu-latest
9292
push: true
9393
tags: |
@@ -125,7 +125,7 @@ jobs:
125125
file: .github/docker-images/Dockerfile
126126
context: .
127127
build-args: |
128-
OS=ubuntu:18.04
128+
OS=ubuntu:22.04
129129
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-ubuntu-latest
130130
push: true
131131
tags: |
@@ -165,7 +165,7 @@ jobs:
165165
file: .github/docker-images/Dockerfile
166166
context: .
167167
build-args: |
168-
OS=ubuntu:18.04
168+
OS=ubuntu:22.04
169169
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:armv7-ubuntu-latest
170170
push: true
171171
tags: |
@@ -203,7 +203,7 @@ jobs:
203203
file: .github/docker-images/Dockerfile
204204
context: .
205205
build-args: |
206-
OS=amazonlinux:2022.0.20221207.4
206+
OS=amazonlinux:2
207207
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-amazonlinux-latest
208208
push: true
209209
tags: |
@@ -241,7 +241,7 @@ jobs:
241241
file: .github/docker-images/Dockerfile
242242
context: .
243243
build-args: |
244-
OS=amazonlinux:2022.0.20221207.4
244+
OS=amazonlinux:2
245245
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-amazonlinux-latest
246246
push: true
247247
tags: |
@@ -355,7 +355,7 @@ jobs:
355355
file: .github/docker-images/integration-tests/ubuntu/Dockerfile
356356
context: .
357357
build-args: |
358-
OS=ubuntu:18.04
358+
OS=ubuntu:22.04
359359
PRE_RELEASE_IMAGE=public.ecr.aws/${{ env.ECR_PRE_RELEASE_REPO }}:x86_64-ubuntu-${{ needs.versioning.outputs.version }}
360360
BASE_IMAGE=public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}:x86_64-ubuntu-latest
361361
push: true
@@ -401,7 +401,7 @@ jobs:
401401
file: .github/docker-images/integration-tests/ubuntu/Dockerfile
402402
context: .
403403
build-args: |
404-
OS=ubuntu:18.04
404+
OS=ubuntu:22.04
405405
PRE_RELEASE_IMAGE=public.ecr.aws/${{ env.ECR_PRE_RELEASE_REPO }}:aarch64-ubuntu-${{ needs.versioning.outputs.version }}
406406
BASE_IMAGE=public.ecr.aws/${{ env.ECR_INTEG_BASE_REPO }}:aarch64-ubuntu-latest
407407
push: true
@@ -444,7 +444,7 @@ jobs:
444444
file: .github/docker-images/integration-tests/ubuntu/Dockerfile
445445
context: .
446446
build-args: |
447-
OS=ubuntu:18.04
447+
OS=ubuntu:22.04
448448
PRE_RELEASE_IMAGE=public.ecr.aws/${{ env.ECR_PRE_RELEASE_REPO }}:armv7-ubuntu-${{ needs.versioning.outputs.version }}
449449
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:armv7-ubuntu-latest
450450
push: true

.github/workflows/release-ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
context: .
4242
target: deploy
4343
build-args: |
44-
OS=ubuntu:18.04
44+
OS=ubuntu:22.04
4545
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-ubuntu-latest
4646
push: false
4747
- name: Get Version
@@ -83,7 +83,7 @@ jobs:
8383
file: .github/docker-images/Dockerfile
8484
context: .
8585
build-args: |
86-
OS=ubuntu:18.04
86+
OS=ubuntu:22.04
8787
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-ubuntu-latest
8888
push: true
8989
tags: |
@@ -124,7 +124,7 @@ jobs:
124124
file: .github/docker-images/Dockerfile
125125
context: .
126126
build-args: |
127-
OS=ubuntu:18.04
127+
OS=ubuntu:22.04
128128
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-ubuntu-latest
129129
push: true
130130
tags: |
@@ -165,7 +165,7 @@ jobs:
165165
file: .github/docker-images/Dockerfile
166166
context: .
167167
build-args: |
168-
OS=ubuntu:18.04
168+
OS=ubuntu:22.04
169169
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:armv7-ubuntu-latest
170170
push: true
171171
tags: |
@@ -206,7 +206,7 @@ jobs:
206206
file: .github/docker-images/Dockerfile
207207
context: .
208208
build-args: |
209-
OS=amazonlinux:latest
209+
OS=amazonlinux:2
210210
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:x86_64-amazonlinux-latest
211211
push: true
212212
tags: |
@@ -247,7 +247,7 @@ jobs:
247247
file: .github/docker-images/Dockerfile
248248
context: .
249249
build-args: |
250-
OS=amazonlinux:latest
250+
OS=amazonlinux:2
251251
BASE_IMAGE=public.ecr.aws/${{ env.ECR_BASE_REPO }}:aarch64-amazonlinux-latest
252252
push: true
253253
tags: |

0 commit comments

Comments
 (0)