Skip to content

Commit 2bfd368

Browse files
committed
demo: pin base image with sha
And setup a workflow to update them montly Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
1 parent 204bfc0 commit 2bfd368

File tree

11 files changed

+91
-15
lines changed

11 files changed

+91
-15
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Update demo bases
2+
on:
3+
schedule:
4+
- cron: '0 0 1 * *' # once a month
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
demo_base_update:
13+
name: Create a PR for demo image updates
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
17+
- name: Install frizbee
18+
run: |
19+
export FRIZBEE_HASH=cda91f86d0c96d0bc3c464c57a601ca414e0b2415372eb19b9a4c82fa3d4f802
20+
export FRIZBEE_VERSION=0.0.15
21+
22+
mkdir /tmp/frizbee
23+
wget -q https://github.com/stacklok/frizbee/releases/download/v${FRIZBEE_VERSION}/frizbee_${FRIZBEE_VERSION}_linux_amd64.tar.gz -O /tmp/frizbee/frizbee.tar.gz
24+
cd /tmp/frizbee
25+
echo "$FRIZBEE_HASH frizbee.tar.gz" | sha256sum -c -
26+
tar xzf frizbee.tar.gz
27+
chmod +x /tmp/frizbee/frizbee
28+
- name: Run update script
29+
run: |
30+
export PATH=$PATH:/tmp/frizbee
31+
cd demo
32+
bash update-shas.sh
33+
- name: Get current date
34+
id: date
35+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
36+
- name: Create Pull Request
37+
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6
38+
with:
39+
commit-message: "demo: update base images ${{ steps.date.outputs.date }}"
40+
title: "Update demo base images (${{ steps.date.outputs.date }})"
41+
token: ${{ secrets.GH_PR_TOKEN }}
42+
branch: demo-base-update-${{ steps.date.outputs.date }}
43+
body: >
44+
PR is auto-generated by GH action.
45+
46+
47+

demo/accel-config-demo/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM debian:unstable-slim AS builder
15+
FROM debian:unstable-slim@sha256:1168b5db3ac36ac7dba548f4cc9d4a2bac856d1404000a07e936d2012d2820bb AS builder
1616

1717
RUN apt-get update && apt-get install -y --no-install-recommends libaccel-config-dev \
1818
gcc g++ nasm make cmake autoconf automake libtool pkg-config git ca-certificates uuid-dev
@@ -29,7 +29,7 @@ RUN cd / && git clone --recurse-submodules --depth 1 --branch v1.5.0 https://git
2929
cmake -DLOG_HW_INIT=ON .. && \
3030
make install
3131

32-
FROM debian:unstable-slim
32+
FROM debian:unstable-slim@sha256:1168b5db3ac36ac7dba548f4cc9d4a2bac856d1404000a07e936d2012d2820bb
3333

3434
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends pciutils accel-config accel-config-test kmod && rm -rf /var/lib/apt/lists/\*
3535

demo/crypto-perf/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:unstable-slim as builder
1+
FROM debian:unstable-slim@sha256:1168b5db3ac36ac7dba548f4cc9d4a2bac856d1404000a07e936d2012d2820bb as builder
22

33
ARG DIR=/dpdk-build
44
WORKDIR $DIR
@@ -37,7 +37,7 @@ RUN mkdir -p /install_root/licenses/dpdk && \
3737
cd /install_root/licenses/dpdk && \
3838
apt-get source --download-only -y libatomic1 libnuma1
3939

40-
FROM debian:unstable-slim
40+
FROM debian:unstable-slim@sha256:1168b5db3ac36ac7dba548f4cc9d4a2bac856d1404000a07e936d2012d2820bb
4141
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends libipsec-mb1 libnuma1 libatomic1 && ldconfig -v
4242
COPY --from=builder /install_root /
4343
COPY run-dpdk-test /usr/bin/

demo/dlb-dpdk-demo/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:20.04 as builder
1+
FROM ubuntu:20.04@sha256:874aca52f79ae5f8258faff03e10ce99ae836f6e7d2df6ecd3da5c1cad3a912b as builder
22

33
ARG DIR=/dpdk-build
44
WORKDIR $DIR
@@ -24,7 +24,7 @@ RUN wget -q https://fast.dpdk.org/rel/$DPDK_TARBALL \
2424
RUN cd dpdk-* && patch -Np1 < $(echo ../dlb/dpdk/dpdk_dlb_*.patch) && sed -i 's/270b,2710,2714/270b,2710,2711,2714/g' ./usertools/dpdk-devbind.py && meson setup --prefix $(pwd)/installdir builddir
2525
RUN cd dpdk-* && ninja -C builddir install && install -D builddir/app/dpdk-test-eventdev /install_root/usr/bin/dpdk-test-eventdev
2626

27-
FROM ubuntu:20.04
27+
FROM ubuntu:20.04@sha256:874aca52f79ae5f8258faff03e10ce99ae836f6e7d2df6ecd3da5c1cad3a912b
2828
RUN apt-get update && apt-get install -y --no-install-recommends libnuma1 libatomic1
2929
COPY --from=builder /install_root /
3030
COPY test.sh /usr/bin/

demo/dlb-libdlb-demo/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:20.04 AS builder
1+
FROM ubuntu:20.04@sha256:874aca52f79ae5f8258faff03e10ce99ae836f6e7d2df6ecd3da5c1cad3a912b AS builder
22

33
WORKDIR /dlb-build
44

@@ -16,7 +16,7 @@ RUN wget https://downloadmirror.intel.com/791459/$DLB_TARBALL \
1616
# Build libdlb
1717
RUN cd dlb/libdlb && make
1818

19-
FROM ubuntu:20.04
19+
FROM ubuntu:20.04@sha256:874aca52f79ae5f8258faff03e10ce99ae836f6e7d2df6ecd3da5c1cad3a912b
2020
COPY --from=builder /dlb-build/dlb/libdlb/libdlb.so /usr/local/lib
2121
RUN ldconfig
2222

demo/intel-opencl-icd/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:22.04@sha256:a6d2b38300ce017add71440577d5b0a90460d0e57fd7aec21dd0d1b0761bbfb2
22

33
ARG APT="env DEBIAN_FRONTEND=noninteractive apt"
44

demo/opae-nlb-demo/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:unstable-slim AS builder
1+
FROM debian:unstable-slim@sha256:1168b5db3ac36ac7dba548f4cc9d4a2bac856d1404000a07e936d2012d2820bb AS builder
22

33
# Install build dependencies
44
RUN apt-get update && apt-get install -y curl python3-dev git gcc g++ make cmake uuid-dev libjson-c-dev libedit-dev libudev-dev
@@ -24,7 +24,7 @@ RUN cd /usr/src/opae/opae-sdk-${OPAE_RELEASE} && \
2424
make -j xfpga nlb0 nlb3
2525

2626

27-
FROM debian:unstable-slim
27+
FROM debian:unstable-slim@sha256:1168b5db3ac36ac7dba548f4cc9d4a2bac856d1404000a07e936d2012d2820bb
2828

2929
RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y libjson-c5
3030

demo/openssl-qat-engine/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:24.04
1+
FROM ubuntu:24.04@sha256:3f85b7caad41a95462cf5b787d8a04604c8262cdcdf9a472b8c52ef83375fe15
22

33
RUN apt update && \
44
apt install --no-install-recommends -y qatengine qatlib-examples qatzip openssl

demo/sgx-aesmd-demo/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Dockerfile is currently provided as a reference to build aesmd with ECDSA attestation
22
# but is not published along with the device plugin container images.
3-
FROM ubuntu:22.04
3+
FROM ubuntu:22.04@sha256:a6d2b38300ce017add71440577d5b0a90460d0e57fd7aec21dd0d1b0761bbfb2
44

55
RUN apt update && apt install -y curl gnupg-agent \
66
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main" | \

demo/sgx-sdk-demo/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04 AS builder
1+
FROM ubuntu:22.04@sha256:a6d2b38300ce017add71440577d5b0a90460d0e57fd7aec21dd0d1b0761bbfb2 AS builder
22

33
WORKDIR /root
44

@@ -66,7 +66,7 @@ RUN cd SGXDataCenterAttestationPrimitives/SampleCode/QuoteVerificationSample \
6666
&& sgx_sign sign -key ../QuoteGenerationSample/Enclave/Enclave_private_sample.pem -enclave enclave.so -out enclave.signed.so -config Enclave/Enclave.config.xml \
6767
&& cd -
6868

69-
FROM ubuntu:22.04
69+
FROM ubuntu:22.04@sha256:a6d2b38300ce017add71440577d5b0a90460d0e57fd7aec21dd0d1b0761bbfb2
7070

7171
RUN apt-get update && \
7272
apt-get install -y \

0 commit comments

Comments
 (0)