Skip to content

Commit 3936a86

Browse files
committed
add latest version info
1 parent 6f4fd6a commit 3936a86

8 files changed

Lines changed: 91 additions & 32 deletions

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image_version=2023.04
1+
image_version=2023.04.17
22
image_name=devsecops-base
33
docker_repo=msaginwm
44

@@ -12,6 +12,9 @@ deploy:
1212
run:
1313
docker run --interactive --tty ${docker_repo}/${image_name}:${image_version} /bin/bash
1414

15+
version-info:
16+
docker run ${docker_repo}/${image_name}:${image_version} cat /install/version.txt > version-info.txt
17+
1518
packages-info:
1619
docker run ${docker_repo}/${image_name}:${image_version} /bin/apt list --installed > packages-info.txt
1720

README.md

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,46 @@
11
[![scan-container-for-vulnerabilities](https://github.com/msagi/devsecops-dockerimage/actions/workflows/container-scanning.yml/badge.svg)](https://github.com/msagi/devsecops-dockerimage/actions/workflows/container-scanning.yml)
22
# Production ready Docker image for DevSecOps pipelines
3+
## Built from up to date Ubuntu packages, up to date DevSecOps tool versions.
4+
## Checked for vulnerabilities every day!
35

4-
## Release: 2023.4
6+
### Base image:
7+
```
8+
Ubuntu (23.04)
9+
```
510

6-
### Base image:
7-
Ubuntu (23.04)
11+
### Tools version:
12+
```
13+
[AWS]
14+
aws-cli/2.11.13 Python/3.11.3 Linux/5.15.49-linuxkit exe/x86_64.ubuntu.23 prompt/off
15+
16+
[Docker]
17+
Docker version 23.0.3, build 3e7cbfd
18+
19+
[kubectl]
20+
clientVersion:
21+
buildDate: "2023-04-14T13:21:19Z"
22+
compiler: gc
23+
gitCommit: 4c9411232e10168d7b050c49a1b59f6df9d7ea4b
24+
gitTreeState: clean
25+
gitVersion: v1.27.1
26+
goVersion: go1.20.3
27+
major: "1"
28+
minor: "27"
29+
platform: linux/amd64
30+
kustomizeVersion: v5.0.1
31+
32+
[make]
33+
GNU Make 4.3
34+
35+
[Python]
36+
Python 3.11.2
37+
```
838

9-
### DevSecOps tools:
10-
* aws-cli (aws-cli/2.11.11 Python/3.11.2 Linux/5.15.49-linuxkit exe/x86_64.ubuntu.23 prompt/off)
11-
* docker (Docker version 23.0.3, build 3e7cbf)
12-
* kubectl (Client Version: v1.26.3, Kustomize Version: v4.5.7)
13-
* make (GNU Make 4.3)
14-
* python3 (Python 3.11.2)
1539

1640
### Lincenses for components used in the image:
17-
* Ubuntu 23.04
18-
* Ubuntu is an aggregate work of many works, each covered by their own licence(s) which are available under /usr/share/doc/PACKAGE/copyright.
19-
* AWS CLI
20-
* Apache 2.0 - [LICENSE](https://github.com/aws/aws-cli/blob/v2/LICENSE.txt)
21-
* Docker
22-
* Apache 2.0 - [LICENSE](https://github.com/docker/docs/blob/main/LICENSE)
23-
* Kubernetes
24-
* Apache 2.0 - [LICENSE](https://github.com/kubernetes/k8s.io/blob/main/LICENSE)
25-
* GNU Make
26-
* GPL 3 - [LICENSE](https://www.gnu.org/licenses/gpl-3.0.en.html)
27-
* Python3
28-
* PSF - [LICENSE](https://docs.python.org/3/license.html#psf-license)
41+
* Ubuntu 23.04 - Ubuntu is an aggregate work of many works, each covered by their own licence(s) which are available under /usr/share/doc/PACKAGE/copyright.
42+
* AWS CLI - Apache 2.0 - [LICENSE](https://github.com/aws/aws-cli/blob/v2/LICENSE.txt)
43+
* Docker - Apache 2.0 - [LICENSE](https://github.com/docker/docs/blob/main/LICENSE)
44+
* Kubernetes - Apache 2.0 - [LICENSE](https://github.com/kubernetes/k8s.io/blob/main/LICENSE)
45+
* GNU Make - GPL 3 - [LICENSE](https://www.gnu.org/licenses/gpl-3.0.en.html)
46+
* Python3 - PSF - [LICENSE](https://docs.python.org/3/license.html#psf-license)

install/packages/aws-cli-v2.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,10 @@ unzip awscliv2.zip
1919
# Install AWS CLI v2
2020
./aws/install
2121

22+
# Print version to version log
23+
echo "[AWS CLI v2]" >> /install/version.txt
24+
aws --version >> /install/version.txt
25+
echo "" >> /install/version.txt
26+
2227
# Cleanup temp folders
2328
rm -rf ${tempFolder}

install/packages/docker.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ apt-get install -y \
2727
docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
2828

2929
# Verify that the installation is successful
30-
docker --version
30+
echo "[Docker]" >> /install/version.txt
31+
docker --version >> /install/version.txt
32+
echo "" >> /install/version.txt

install/packages/kubectl.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@
44
apt install -y \
55
curl
66

7-
version=v1.26.3
8-
97
# create temp folder
108
tempFolder=/tmp/install-kubectl
119
mkdir ${tempFolder}
1210
cd ${tempFolder}
1311

1412
# Check for latest stable version
15-
latestStableVersion=$(curl -L -s https://dl.k8s.io/release/stable.txt)
16-
17-
if "${version}" -ne "${latestStableVersion}"; then
18-
echo "WARNING: New latest stable version is available: ${latestStableVersion}"
19-
fi
13+
version=$(curl -L -s https://dl.k8s.io/release/stable.txt)
2014

2115
# Download binary linux amd64 release
2216
curl -LO "https://dl.k8s.io/release/${version}/bin/linux/amd64/kubectl"
@@ -35,7 +29,10 @@ fi
3529
# Install kubectl
3630
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
3731

38-
kubectl version --client
32+
echo "[kubectl]" >> /install/version.txt
33+
kubectl version --output yaml >> /install/version.txt
34+
# kubectl version prints an empty line after version info
35+
#echo "" >> /install/version.txt
3936

4037
# Cleanup temp folders
4138
rm -rf ${tempFolder}

install/packages/make.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env bash
22

33
apt install -y \
4-
make
4+
make
5+
6+
echo "[make]" >> /install/version.txt
7+
make --version | sed '1q' >> /install/version.txt
8+
echo "" >> /install/version.txt

install/packages/python3.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ apt install -y \
55
python3 \
66
python3-dev \
77
python3-venv
8+
9+
echo "[Python]" >> /install/version.txt
10+
python3 --version >> /install/version.txt
11+
echo "" >> /install/version.txt

version-info.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[AWS CLI v2]
2+
aws-cli/2.11.13 Python/3.11.3 Linux/5.15.49-linuxkit exe/x86_64.ubuntu.23 prompt/off
3+
4+
[Docker]
5+
Docker version 23.0.3, build 3e7cbfd
6+
7+
[kubectl]
8+
clientVersion:
9+
buildDate: "2023-04-14T13:21:19Z"
10+
compiler: gc
11+
gitCommit: 4c9411232e10168d7b050c49a1b59f6df9d7ea4b
12+
gitTreeState: clean
13+
gitVersion: v1.27.1
14+
goVersion: go1.20.3
15+
major: "1"
16+
minor: "27"
17+
platform: linux/amd64
18+
kustomizeVersion: v5.0.1
19+
20+
21+
[make]
22+
GNU Make 4.3
23+
24+
[Python]
25+
Python 3.11.2
26+

0 commit comments

Comments
 (0)