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

Change Base Image to Ubuntu 22.04 #370

Merged
merged 12 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix base image building
  • Loading branch information
xusine committed Feb 9, 2023
commit f5db29bafda6497e2eecf22db3cbc13cbf992b13
12 changes: 3 additions & 9 deletions .github/scripts/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,15 @@ if (grep -q "${DF_PATH#./}" <<<$modified_files) || # Rebuild the image if any fi
DO_PUSH="--push"
fi

if ([ $image_name = "base-os" ] || [ $IMG_TAG = "openjdk11" ]); then
if ([ $image_name = "base-os" ]); then
cd $DF_PATH
for arch in amd64 arm64 riscv64; do
if [ $IMG_TAG = "openjdk11" ]; then
docker buildx build --platform=linux/${arch} -t $DH_REPO:${arch} -f Dockerfile --build-arg EXTERNAL_ARG="/usr/lib/jvm/java-11-openjdk-${arch}/" $DO_PUSH .
else
docker buildx build --platform=linux/${arch} -t $DH_REPO:${arch} -f Dockerfile.${arch} $DO_PUSH .
fi

docker buildx build --platform=linux/${arch} -t $DH_REPO:${arch} -f Dockerfile.${arch} $DO_PUSH .
if [ $? != "0" ]; then
exit 1
fi
if [ -n "$DO_PUSH" ]; then
docker manifest create --amend $DH_REPO:$IMG_TAG $DH_REPO:amd64 $DH_REPO:arm64 $DH_REPO:riscv64
docker manifest push $DH_REPO:$IMG_TAG
docker buildx imagetools create -t $DH_REPO:$IMG_TAG $DH_REPO:amd64 $DH_REPO:arm64 $DH_REPO:riscv64
fi
done
else
Expand Down
1 change: 0 additions & 1 deletion commons/base-os/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion commons/base-os/Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM debian:buster
FROM ubuntu:22.04
2 changes: 1 addition & 1 deletion commons/base-os/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM debian:buster
FROM ubuntu:22.04
22 changes: 1 addition & 21 deletions commons/base-os/Dockerfile.riscv64
Original file line number Diff line number Diff line change
@@ -1,22 +1,2 @@
FROM --platform=linux/amd64 debian:sid AS build
FROM riscv64/ubuntu:22.04

RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends debootstrap \
&& echo "deb http://ftp.ports.debian.org/debian-ports sid main" >> /etc/apt/sources.list \
&& apt-get install -y debian-ports-archive-keyring \
&& dpkg --add-architecture riscv64 \
&& apt-get update \
&& debootstrap \
--keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg \
--arch=riscv64 \
--variant=minbase \
--include=debian-ports-archive-keyring \
sid /rootfs http://ftp.ports.debian.org/debian-ports \
&& rm -rf /rootfs/var/log/dpkg.log /rootfs/var/log/bootstrap.log /rootfs/var/log/alternatives.log \
&& rm -rf /rootfs/var/cache/ldconfig/aux-cache /rootfs/var/cache/apt/* \
&& rm -rf /rootfs/var/lib/apt/lists/*

FROM scratch
COPY --from=build /rootfs/ /
CMD ["bash"]