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

5
01_registry_pull/pull.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
docker pull ubuntu:23.04
docker image ls | grep ubuntu

View file

@ -0,0 +1,8 @@
FROM ubuntu:22.04
RUN apt update
RUN apt install -yq --no-install-recommends \
# git \
wget \
gcc
COPY cool_file.txt /

View file

@ -0,0 +1,16 @@
#!/bin/bash
# build the image
docker build -t simple:02 .
# see the image now exists
docker image ls | grep simple
# run interactive container of image
# -i = interactive
# -t = allocate a pseudo tty for interactive shell
# --rm remove the container created by this run command after it exits
docker run -it --rm simple:02 /bin/bash
# alternatively, start the container, print the file, and exit/close the container
# docker run --rm simple:02 cat /cool_file.txt

View file

@ -0,0 +1 @@
Hello there!

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

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# docker_demo
Set of demo examples to demonstrate docker capabilities