Skip to content
Closed
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
11 changes: 0 additions & 11 deletions .devcontainer/Dockerfile

This file was deleted.

6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
"name": "azure-osconfig",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
"dockerfile": "../devops/docker/ubuntu-24.04-amd64/Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"installOhMyZsh": true
},
"ghcr.io/devcontainers-extra/features/pre-commit:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
Expand Down
42 changes: 21 additions & 21 deletions .github/test-matrix.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[
{"name":"almalinux-9","arch":"amd64","tag":"@sha256:457a85686d95bd324c1ddbdba43fccb79d8c127c11b1189941ccc913989461c5"},
{"name":"amazonlinux-2","arch":"amd64","tag":"@sha256:5f78d184712b39087d4448d1fe04ffa6a4dbb6e5ff0e29cdef0eff1f3980cfd8"},
{"name":"azurelinux-3","arch":"amd64","tag":"@sha256:6d8d1134816ee789c5579570d83671cd572ac0634a1ffdc04a0ef5471f8b0877"},
{"name":"centos-7","arch":"amd64","tag":"@sha256:0e72fef7615ffd41db07a0cb4a2d989f74925bc49a546c719f7ccb857852108a"},
{"name":"centos-8","arch":"amd64","tag":"@sha256:2fb02a9f8259b91ea938c003a845b7e9dc7150ea643bf8c1b6ae8bd4087d8706"},
{"name":"debian-10","arch":"amd64","tag":"@sha256:a05ae3e90f16cd284e3c0c818420c2685c17f327c0e6a1967837573490a2a327"},
{"name":"debian-11","arch":"amd64","tag":"@sha256:368dac89e858472de6435c86905c26749eb42e4a944b177b0df5c2dcb741b693"},
{"name":"debian-12","arch":"amd64","tag":"@sha256:63a8712390f4aed657924706ed0c4ce1c37d4c5d5c189625a09785e00fceac62"},
{"name":"debian-9","arch":"amd64","tag":"@sha256:7665a7e37457e59e3d240219230cf2a030aa9fe1a00e08a92b144ba8c383419e"},
{"name":"mariner-2","arch":"amd64","tag":"@sha256:7080c3c0e03bf530e09ac94ae7f486e005534706cebe4df623f71de49d0f2904"},
{"name":"oraclelinux-7","arch":"amd64","tag":"@sha256:0561e7c5d0ae0486450ad086bf3e25a69be721e52df1df63bd835972322fb1e4"},
{"name":"oraclelinux-8","arch":"amd64","tag":"@sha256:1bf1d1622e5163d02c2066b15bd18294bf301a1df1d60318d7a396fc0e795b66"},
{"name":"rhel-7","arch":"amd64","tag":"@sha256:5739b3749eea6af70f6a76ce092e9a3b1b2f8f8ed1b6002bade36c28e74426c4"},
{"name":"rhel-8","arch":"amd64","tag":"@sha256:fd4b3005958abe0c8a3f9aee3be3604c9a778de80e89dd9d62b3c0864a701383"},
{"name":"rhel-9","arch":"amd64","tag":"@sha256:7cfb079ea2887a9cc8a524f109873126a76684076bec13bbd87e139d8d053b78"},
{"name":"rockylinux-9","arch":"amd64","tag":"@sha256:93c24f671cd27cfbf92a25177fbaa43fdf4a1da4911794ce771cb44bad096604"},
{"name":"sles-15","arch":"amd64","tag":"@sha256:b633a6effbe084b5cf34f1e10995374feb61b0a366160c5e7a786237aeb877a8"},
{"name":"ubuntu-18.04","arch":"amd64","tag":"@sha256:d0bf753624703349ad20886de2b7795caf46db005d5a5ece633aaa5aec7505f9"},
{"name":"ubuntu-20.04","arch":"amd64","tag":"@sha256:31687451ce1b8f50f4f26884bd0947fb5d5dba8711c63601b14bc0b19cb5c6ca"},
{"name":"ubuntu-22.04","arch":"amd64","tag":"@sha256:de2c11da255fa2c0ec39c9f56a53aaefbb4db97982e11c9487116551fc4ecae0"},
{"name":"ubuntu-24.04","arch":"amd64","tag":"@sha256:f660171fcbb5ef1669303456c85b7a0f9fba447c2e35ae89953f9070200f5c15"}
{"name": "almalinux-9", "arch": "amd64", "tag": "@sha256:815553327dabe2fbf52548ce48e63eb71c3982c1be6ad07fc77903cdb81da331"},
{"name": "amazonlinux-2", "arch": "amd64", "tag": "@sha256:b4764b4edf07892f9a02c6e901eeac43bf6c883abae7df2ef76396d190107055"},
{"name": "azurelinux-3", "arch": "amd64", "tag": "@sha256:541935b005d65281798dcd4a8c3400650d70105afcfd5cd34dd3ecbccfec5e74"},
{"name": "centos-7", "arch": "amd64", "tag": "@sha256:88a3d3275dc6bfd7d6efd2a18fe953d6ddac4f86af1d311c7a606b7cf5b37c10"},
{"name": "centos-8", "arch": "amd64", "tag": "@sha256:c851b4a976cb34c9a8659d2219514f7ce3481fd11bcb8e86a3109040f4ff7d15"},
{"name": "debian-10", "arch": "amd64", "tag": "@sha256:991e547ce9fe3db366bfe7901ec728e2dfb4dd31414fe483db78d43d92409b8f"},
{"name": "debian-11", "arch": "amd64", "tag": "@sha256:2d45d6f99a517c3ceb970c21faa3cda6d9d6b34f70593cf971cec095e2d090b0"},
{"name": "debian-12", "arch": "amd64", "tag": "@sha256:630feaa03825b3f319df2b09c9a0216a0a11902e923713144399357218254d2e"},
{"name": "debian-9", "arch": "amd64", "tag": "@sha256:70324140a7840356f1e45f6477dc55db4719f04a9992a90ce09ca81a8858637b"},
{"name": "mariner-2", "arch": "amd64", "tag": "@sha256:18c338a157b3f22a30ac854efa7beffc8f35566d5e22177c5afbeb14802e32d6"},
{"name": "oraclelinux-7", "arch": "amd64", "tag": "@sha256:0af5af8dbf8508aef4f9e46bb789f4444f8b6dfdbbe0ed4949e047f903261274"},
{"name": "oraclelinux-8", "arch": "amd64", "tag": "@sha256:f422f0ed324b5f3fbf2e5e09275a03d7a290ec3aa24c55ea388cc50b6ccc576d"},
{"name": "rhel-7", "arch": "amd64", "tag": "@sha256:f081fea3fb438bdadbe37ede21ef1ccaccd6bb1a92a99e01fbee8aa270a29859"},
{"name": "rhel-8", "arch": "amd64", "tag": "@sha256:98cc3106943b549059c126443c3dd1c9faf7e8e217b5f3feb94a8482d3a6afc6"},
{"name": "rhel-9", "arch": "amd64", "tag": "@sha256:46cbe90ba3734b58692fa95af1414f870ef449b934cf89af84e6aa02fc3d7480"},
{"name": "rockylinux-9", "arch": "amd64", "tag": "@sha256:a881fec8ac89651d3dd724761439130f96932406f70d43e2631be81307053ec5"},
{"name": "sles-15", "arch": "amd64", "tag": "@sha256:a9ce3548af3a0fba29ee2a35471894bc3c1ef32ce5e445d5fea0a94140cc0d75"},
{"name": "ubuntu-18.04", "arch": "amd64", "tag": "@sha256:5db0f9333ec7fc89d10b990b97ca2b97f7c975a6acf22beb1abee86e7f1b8bbc"},
{"name": "ubuntu-20.04", "arch": "amd64", "tag": "@sha256:70a23590f03aeec76208d970d3fc73afcfa4006764ecb9867760456dae34efe4"},
{"name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:0eed71cef37604c37186ec035974168a40a84d27e26d3b746a2858d99f305e2e"},
{"name": "ubuntu-24.04", "arch": "amd64", "tag": "@sha256:0a3038b32d4b5d0f2402d576f4a96533e01e98b608eb095928e523b7ef9dfa2f"}
]
2 changes: 1 addition & 1 deletion .github/workflows/ci-gcovr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
matrix="$(cat <<'EOL'
[
{ "name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6" }
{ "name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:0eed71cef37604c37186ec035974168a40a84d27e26d3b746a2858d99f305e2e" }
]
EOL
)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
matrix="$(cat <<'EOL'
[
{ "name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6" }
{ "name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:0eed71cef37604c37186ec035974168a40a84d27e26d3b746a2858d99f305e2e" }
]
EOL
)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
(cd external/vcpkg && sed -e "s/\"2\\.7\\.4\"/\"1\\.0\\.0\"/g" -i scripts/vcpkg-tools.json && ./bootstrap-vcpkg.sh)
mkdir build && cd build
if [ "${{ matrix.target.name }}" = "ubuntu-14.04" ]; then
cmake ../src -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Duse_prov_client=ON -Dhsm_type_symm_key=ON -DCOMPILE_WITH_STRICTNESS=ON -DBUILD_TESTS=ON -DBUILD_SAMPLES=ON -DBUILD_ADAPTERS=ON -Duse_default_uuid=ON -DVCPKG_OVERLAY_TRIPLETS=../src/triplets -DVCPKG_TARGET_TRIPLET=x64-linux-gcc5
cmake ../src -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Duse_prov_client=ON -Dhsm_type_symm_key=ON -DCOMPILE_WITH_STRICTNESS=ON -DBUILD_TESTS=ON -DBUILD_SAMPLES=ON -DBUILD_ADAPTERS=ON -Duse_default_uuid=ON -DVCPKG_OVERLAY_TRIPLETS=../src/triplets -DVCPKG_TARGET_TRIPLET=x64-linux-gcc5 -DVCPKG_OVERLAY_PORTS=../src/ports-overlay
else
cmake ../src -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Duse_prov_client=ON -Dhsm_type_symm_key=ON -DCOMPILE_WITH_STRICTNESS=ON -DBUILD_TESTS=ON -DBUILD_SAMPLES=ON -DBUILD_ADAPTERS=ON -Duse_default_uuid=ON
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzzing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
target:
[
{ os: ubuntu, version: 22.04, package-type: DEB, container-tag: '@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6' },
{ os: ubuntu, version: 22.04, package-type: DEB, container-tag: '@sha256:0eed71cef37604c37186ec035974168a40a84d27e26d3b746a2858d99f305e2e' },
]
arch: [amd64]
with:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/module-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
matrix:
target:
[
{ os: almalinux, version: 9, package-type: RPM, container-tag: "@sha256:457a85686d95bd324c1ddbdba43fccb79d8c127c11b1189941ccc913989461c5" },
{ os: azurelinux, version: 3, package-type: RPM, container-tag: "@sha256:6d8d1134816ee789c5579570d83671cd572ac0634a1ffdc04a0ef5471f8b0877" },
{ os: debian, version: 11, package-type: DEB, container-tag: "@sha256:368dac89e858472de6435c86905c26749eb42e4a944b177b0df5c2dcb741b693" },
{ os: debian, version: 12, package-type: DEB, container-tag: "@sha256:63a8712390f4aed657924706ed0c4ce1c37d4c5d5c189625a09785e00fceac62" },
{ os: oraclelinux, version: 8, package-type: RPM, container-tag: "@sha256:1bf1d1622e5163d02c2066b15bd18294bf301a1df1d60318d7a396fc0e795b66" },
{ os: rhel, version: 8, package-type: RPM, container-tag: "@sha256:fd4b3005958abe0c8a3f9aee3be3604c9a778de80e89dd9d62b3c0864a701383" },
{ os: rhel, version: 9, package-type: RPM, container-tag: "@sha256:7cfb079ea2887a9cc8a524f109873126a76684076bec13bbd87e139d8d053b78" },
{ os: sles, version: 15, package-type: RPM, container-tag: "@sha256:b633a6effbe084b5cf34f1e10995374feb61b0a366160c5e7a786237aeb877a8" },
{ os: ubuntu, version: 20.04, package-type: DEB, container-tag: "@sha256:31687451ce1b8f50f4f26884bd0947fb5d5dba8711c63601b14bc0b19cb5c6ca" },
{ os: ubuntu, version: 22.04, package-type: DEB, container-tag: "@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6" },
{ os: ubuntu, version: 24.04, package-type: DEB, container-tag: "@sha256:f660171fcbb5ef1669303456c85b7a0f9fba447c2e35ae89953f9070200f5c15" },
{ os: almalinux, version: 9, package-type: RPM, container-tag: "@sha256:815553327dabe2fbf52548ce48e63eb71c3982c1be6ad07fc77903cdb81da331" },
{ os: azurelinux, version: 3, package-type: RPM, container-tag: "@sha256:541935b005d65281798dcd4a8c3400650d70105afcfd5cd34dd3ecbccfec5e74" },
{ os: debian, version: 11, package-type: DEB, container-tag: "@sha256:2d45d6f99a517c3ceb970c21faa3cda6d9d6b34f70593cf971cec095e2d090b0" },
{ os: debian, version: 12, package-type: DEB, container-tag: "@sha256:630feaa03825b3f319df2b09c9a0216a0a11902e923713144399357218254d2e" },
{ os: oraclelinux, version: 8, package-type: RPM, container-tag: "@sha256:f422f0ed324b5f3fbf2e5e09275a03d7a290ec3aa24c55ea388cc50b6ccc576d" },
{ os: rhel, version: 8, package-type: RPM, container-tag: "@sha256:98cc3106943b549059c126443c3dd1c9faf7e8e217b5f3feb94a8482d3a6afc6" },
{ os: rhel, version: 9, package-type: RPM, container-tag: "@sha256:46cbe90ba3734b58692fa95af1414f870ef449b934cf89af84e6aa02fc3d7480" },
{ os: sles, version: 15, package-type: RPM, container-tag: "@sha256:a9ce3548af3a0fba29ee2a35471894bc3c1ef32ce5e445d5fea0a94140cc0d75" },
{ os: ubuntu, version: 20.04, package-type: DEB, container-tag: "@sha256:70a23590f03aeec76208d970d3fc73afcfa4006764ecb9867760456dae34efe4" },
{ os: ubuntu, version: 22.04, package-type: DEB, container-tag: "@sha256:0eed71cef37604c37186ec035974168a40a84d27e26d3b746a2858d99f305e2e" },
{ os: ubuntu, version: 24.04, package-type: DEB, container-tag: "@sha256:0a3038b32d4b5d0f2402d576f4a96533e01e98b608eb095928e523b7ef9dfa2f" },
]
arch: [amd64]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nrp-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
matrix:
target:
[
{ os: ubuntu, version: 14.04, arch: amd64, dist: trusty, package-type: DEB, tag: "@sha256:d6f9c8072541d23779b0fbd4ff53d7b55dbdcf5d8998aa44a790546d9ec1e747" },
{ os: ubuntu, version: 14.04, arch: amd64, dist: trusty, package-type: DEB, tag: "@sha256:49f34a36780ee52c0b800c1035097e51e59293c8b725d4f94114a491065e0c2a" },
]
secrets:
onedstenant: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
cmd: |
(cd ../external/vcpkg && sed -e "s/\"2\\.7\\.4\"/\"1\\.0\\.0\"/g" -i scripts/vcpkg-tools.json && ./bootstrap-vcpkg.sh)
if [ "${{ inputs.machine-config }}" = "true" ]; then
cmake ../src -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVCPKG_OVERLAY_TRIPLETS=../src/triplets -DVCPKG_TARGET_TRIPLET=x64-linux-gcc5
cmake ../src -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVCPKG_OVERLAY_TRIPLETS=../src/triplets -DVCPKG_TARGET_TRIPLET=x64-linux-gcc5 -DVCPKG_OVERLAY_PORTS=../src/ports-overlay
elif [ "${{ inputs.build-fuzzers }}" = "true" ]; then
cmake ../src -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER='/usr/bin/clang' -DCMAKE_CXX_COMPILER='/usr/bin/clang++' -DTWEAK_VERSION='${{ steps.version.outputs.tweak }}' -Duse_prov_client=ON -Dhsm_type_symm_key=ON -DCOMPILE_WITH_STRICTNESS=ON -DBUILD_TESTS=OFF -DBUILD_MODULETEST=OFF -DBUILD_SAMPLES=OFF -Duse_default_uuid=ON -DBUILD_ADAPTERS=ON -DBUILD_FUZZER=ON
else
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Analyze
runs-on: ubuntu-latest
container:
image: ghcr.io/azure/azure-osconfig/ubuntu-22.04-amd64@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6
image: ghcr.io/azure/azure-osconfig/ubuntu-22.04-amd64@sha256:0eed71cef37604c37186ec035974168a40a84d27e26d3b746a2858d99f305e2e

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/universalnrp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ jobs:
${{
(github.ref == 'refs/heads/main' && secrets.ONEDS_TENANT_PROD) ||
(github.ref == 'refs/heads/dev' && secrets.ONEDS_TENANT_NONPROD) ||
(github.ref == 'refs/heads/ahbenmes/telemetry_staging' && secrets.ONEDS_TENANT_NONPROD) ||
''
}}
with:
target: ubuntu-14.04
arch: amd64
artifact: nrp-test
package-type: DEB
container-tag: "@sha256:d6f9c8072541d23779b0fbd4ff53d7b55dbdcf5d8998aa44a790546d9ec1e747"
container-tag: "@sha256:49f34a36780ee52c0b800c1035097e51e59293c8b725d4f94114a491065e0c2a"
test: true
machine-config: true
release: ${{ github.event_name == 'pull_request' && false || true }}
Expand Down
40 changes: 36 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,43 @@ OSConfig's C/C++ code currently targets compliance with C11.

### Prerequisites

Make sure all dependencies are installed. For example, on Ubuntu:
Build environments have many dependencies required, the easiest way to get started is to use our pre-defined container environments in [devops/docker](devops/docker/).

Make sure all dependencies are installed for your distribution. All of our supported distributions are documented in the Dockerfiles under [devops/docker](devops/docker/) (additional packages may be present for CI which are not necessary for building). The following packages are typically required however the package names may vary across distributions. There might also be packages that are out-of-date so they are built installed from source.

**Common build dependencies across distributions:**
- vcpkg dependencies - [Supported hosts | Dependencies | Microsoft Learn](https://learn.microsoft.com/vcpkg/concepts/supported-hosts)
- git
- curl
- autoconf
- unzip
- zip
- cmake (>= 3.16.0)
- build-essential (gcc >= 4.4.7, g++, make)
- perl (perl-core, perl-IPC-Cmd)
- tar
- python3

Refer to the specific Dockerfile for your distribution under [devops/docker/](devops/docker/) for the complete and up-to-date list of dependencies. See the following example. The environments do also contain tools used in our CI which are not required for building (bc, jq, libubsan1, libasan8, clang, clang-tools, file).

#### Example prerequisite install on Ubuntu 24.04
Using the pre-defined [devops/docker/ubuntu-24.04-amd64/Dockerfile](devops/docker/ubuntu-24.04-amd64/Dockerfile) we can simply use the `RUN` commands to install all needed pre-requisites. We also need to run `sudo -i` since many commands require `root` (some uneeded packages only used by CI were omitted).

```bash
sudo apt-get update
sudo apt-get install -y git cmake build-essential curl libcurl4-openssl-dev libssl-dev uuid-dev libgtest-dev libgmock-dev rapidjson-dev
# Login as `root` so we don't have to `sudo` all the time
sudo -i
apt -y update && apt-get -y install software-properties-common
apt -y update && apt-get -y install \
build-essential \
cmake \
git \
pkg-config \
tar \
unzip \
wget \
zip
# Logout of `root`
exit
```

Verify that CMake is at least version 3.16.0 and gcc is at least version 4.4.7.
Expand All @@ -34,7 +66,7 @@ gcc --version

For IoT Hub management, you can install and configure the *Azure IoT Identity Service (AIS)* package as described at [azure.github.io/iot-identity-service/](https://azure.github.io/iot-identity-service/).

For contributing to the project, also install the following prerequisites for [pre-commit](https://pre-commit.com/):
For contributing to the project, also install the following prerequisites for [pre-commit](https://pre-commit.com/) (or just use the devcontainer):

```bash
sudo apt-get install python3
Expand Down
16 changes: 4 additions & 12 deletions devops/docker/almalinux-9-amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# TODO: Add mcr.io retagged images
FROM almalinux:9

ARG CMAKE_VERSION=v3.21.7

RUN dnf install -y \
autoconf \
gcc \
gcc-c++ \
git \
jq \
libcurl-devel \
libtool \
make \
openssl-devel \
make \
perl \
perl-IPC-Cmd \
rpm-build \
Expand All @@ -21,14 +22,5 @@ RUN dnf install -y \
WORKDIR /git

# CMake
RUN git clone https://github.com/Kitware/CMake --recursive -b v3.21.7
RUN git clone https://github.com/Kitware/CMake --recursive -b ${CMAKE_VERSION}
RUN cd CMake && ./bootstrap && make -j$(nproc) && make install && hash -r && rm -rf /git/CMake

# GTest
RUN git clone https://github.com/google/googletest --recursive -b v1.12.0
RUN cd googletest && cmake . && cmake --build . --parallel --target install && rm -rf /git/googletest

# rapidjson
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson
17 changes: 4 additions & 13 deletions devops/docker/amazonlinux-2-amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# TODO: Add mcr.io retagged images
FROM amazonlinux:2

ARG CMAKE_VERSION=v3.21.7

RUN yum install -y \
autoconf \
curl \
gcc \
gcc-c++ \
git \
jq \
libcurl-devel \
libtool \
make \
openssl-devel \
make \
perl \
perl-core \
perl-IPC-Cmd \
Expand All @@ -23,14 +23,5 @@ RUN yum install -y \
WORKDIR /git

# CMake
RUN git clone https://github.com/Kitware/CMake --recursive -b v3.21.7
RUN git clone https://github.com/Kitware/CMake --recursive -b ${CMAKE_VERSION}
RUN cd CMake && ./bootstrap && make -j$(nproc) && make install && hash -r && rm -rf /git/CMake

# GTest
RUN git clone https://github.com/google/googletest --recursive -b v1.12.0
RUN cd googletest && cmake . && cmake --build . --parallel --target install && rm -rf /git/googletest

# rapidjson
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson
Loading
Loading