-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Ubuntu 22.04 execution container; Use machine's architecture name…
… for local builds. (#264)
- Loading branch information
Showing
5 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
# Exit on any error | ||
set -e | ||
|
||
# Error on undefined variable | ||
set -u | ||
|
||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
repo_root=${script_dir}/../../../ | ||
|
||
docker build -t clp-execution-x86-ubuntu-focal:dev ${repo_root} --file ${script_dir}/Dockerfile | ||
arch=$(uname -m) | ||
|
||
if [ "$arch" = "x86_64" ]; then | ||
arch_name="x86" | ||
elif [ "$arch" = "aarch64" ]; then | ||
arch_name="arm64" | ||
else | ||
echo "Error: Unsupported architecture - $arch" | ||
exit 1 | ||
fi | ||
|
||
docker build -t clp-execution-${arch_name}-ubuntu-focal:dev ${repo_root} \ | ||
--file ${script_dir}/Dockerfile |
2 changes: 1 addition & 1 deletion
2
tools/docker-images/clp-execution-base-focal/setup-scripts/install-prebuilt-packages.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
# Exit on any error | ||
set -e | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM ubuntu:jammy | ||
|
||
WORKDIR /root | ||
|
||
RUN mkdir -p ./tools/docker-images/clp-execution-base-jammy | ||
ADD ./tools/docker-images/clp-execution-base-jammy/setup-scripts ./tools/docker-images/clp-execution-base-jammy/setup-scripts | ||
|
||
RUN mkdir -p ./tools/scripts/lib_install | ||
ADD ./components/core/tools/scripts/lib_install ./tools/scripts/lib_install | ||
|
||
RUN ./tools/docker-images/clp-execution-base-jammy/setup-scripts/install-prebuilt-packages.sh | ||
|
||
# Reset the working directory so that it's accessible by any user who runs the | ||
# container | ||
WORKDIR / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Exit on any error | ||
set -e | ||
|
||
# Error on undefined variable | ||
set -u | ||
|
||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
repo_root=${script_dir}/../../../ | ||
|
||
arch=$(uname -m) | ||
|
||
if [ "$arch" = "x86_64" ]; then | ||
arch_name="x86" | ||
elif [ "$arch" = "aarch64" ]; then | ||
arch_name="arm64" | ||
else | ||
echo "Error: Unsupported architecture - $arch" | ||
exit 1 | ||
fi | ||
|
||
docker build -t clp-execution-${arch_name}-ubuntu-jammy:dev ${repo_root} \ | ||
--file ${script_dir}/Dockerfile |
16 changes: 16 additions & 0 deletions
16
tools/docker-images/clp-execution-base-jammy/setup-scripts/install-prebuilt-packages.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Exit on any error | ||
set -e | ||
|
||
# Error on undefined variable | ||
set -u | ||
|
||
apt-get update | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
checkinstall \ | ||
curl \ | ||
libmariadb-dev \ | ||
python3 \ | ||
rsync \ | ||
zstd |