initial commit

This commit is contained in:
len0rd 2023-10-23 23:47:34 -04:00
commit 3f900a2f75
9 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,17 @@
FROM ubuntu:22.04
RUN apt update \
&& apt install -yq --no-install-recommends \
wget \
tar \
xz-utils \
ca-certificates \
&& rm -rf /var/lib/apt/list
ARG CMAKE_VERSION=3.16.5
RUN wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh \
-q --no-verbose --show-progress --progress=bar:force:noscroll -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /usr/bin/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/ \
&& rm /tmp/cmake-install.sh

View file

@ -0,0 +1,9 @@
#!/bin/bash
# build with CMake version specified in dockerfile
docker build -t with_args:default .
docker run --rm with_args:default cmake --version
# build with specific CMake version
docker build --build-arg CMAKE_VERSION=3.26.5 -t with_args:3.26 .
docker run --rm with_args:3.26 cmake --version