Skip to content

Commit 6f44ef9

Browse files
authored
SYS-664 image updates - mariadb-galera, mysqldump, postfix, haproxy-keepalived (#233)
1 parent 39740a4 commit 6f44ef9

11 files changed

Lines changed: 90 additions & 42 deletions

File tree

.gitlab-ci.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ stages:
2222
- postfix
2323
- postfix-python
2424
- proftpd
25-
- python-builder
26-
- python-wsgi
2725
- rsyslogd
2826
- samba
2927
- samba-dc
@@ -239,24 +237,6 @@ proftpd:
239237
only:
240238
changes: [ images/proftpd/**, lib/**, .image-gitlab-ci.yml ]
241239

242-
python-builder:
243-
stage: python-builder
244-
trigger:
245-
include:
246-
- artifact: .child-python-builder.yml
247-
job: prepare
248-
only:
249-
changes: [ images/python-builder/**, lib/**, .image-gitlab-ci.yml ]
250-
251-
python-wsgi:
252-
stage: python-wsgi
253-
trigger:
254-
include:
255-
- artifact: .child-python-wsgi.yml
256-
job: prepare
257-
only:
258-
changes: [ images/python-wsgi/**, lib/**, .image-gitlab-ci.yml ]
259-
260240
rsyslogd:
261241
stage: rsyslogd
262242
trigger:

.image-gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ variables:
44
IMAGE: {{ IMAGE }}
55
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
66
REGISTRY: $REGISTRY_URI/$CI_PROJECT_PATH
7-
TRIVY_VERSION: 0.54.1
7+
TRIVY_VERSION: 0.67.2
88

99
stages:
1010
- Static Code Analysis

images/haproxy-keepalived/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM haproxy:3.2.4-alpine
1+
FROM haproxy:3.2.7-alpine
22
ARG BUILD_DATE
33
ARG VCS_REF
44
LABEL org.opencontainers.image.authors="Rich Braun docker@instantlinux.net" \

images/haproxy-keepalived/helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ sources:
77
- https://github.com/haproxy/haproxy
88
- https://github.com/acassen/keepalived
99
type: application
10-
version: 0.1.19
11-
appVersion: "3.2.4-alpine-2.3.1-r0"
10+
version: 0.1.20
11+
appVersion: "3.2.7-alpine-2.3.1-r0"
1212
dependencies:
1313
- name: chartlib
1414
version: 0.1.8

images/mariadb-galera/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ RUN groupmod -g $GID mysql && \
2828
/var/lib/apt/lists /var/cache/debconf/*old /root/.cache
2929
RUN pip install -r /root/common.txt --break-system-packages && \
3030
echo "dash dash/sh boolean false" | debconf-set-selections && \
31+
# 'gosu' in MariaDB official image is incompatible with trivy scanner
32+
rm /usr/local/bin/gosu && \
3133
dpkg-reconfigure dash || true
3234

3335
EXPOSE 3306 4444 4567/udp 4567 4568

images/mariadb-galera/Makefile

Lines changed: 77 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,74 @@
1-
# Standard Makefile for python application
2-
# created by rbraun @ splunk 7-Apr-2017
1+
# Standard Makefile for Docker image
2+
# created by richb@instantlinux.net 20-Apr-2017
33

4-
SRC ?= src
5-
VENV ?= python_env
6-
VDIR ?= $(PWD)/$(VENV)
4+
BUILDX = https://github.com/docker/buildx/releases/download/v0.4.1/buildx-v0.4.1.linux-amd64
5+
PLATFORMS ?= linux/amd64
6+
PUSH ?= --push
7+
USER_LOGIN ?= instantlinux
8+
VENV = python_env
9+
VDIR = $(PWD)/$(VENV)
10+
11+
export IMAGE_NAME = $(REGISTRY)/$(IMAGE):$(TAG)
12+
export DOCKER_REPO = $(USER_LOGIN)/$(IMAGE)
13+
14+
ifneq ($(CI_COMMIT_TAG),)
15+
TAG_OPT = --tag $(USER_LOGIN)$(IMAGE):$(CI_COMMIT_TAG)
16+
endif
17+
18+
# Exceptions
19+
ifeq ($(IMAGE),data-sync)
20+
PLATFORMS = linux/amd64,linux/aarch64
21+
endif
22+
ifeq ($(IMAGE),mariadb-galera)
23+
PLATFORMS = linux/amd64
24+
endif
25+
ifeq ($(IMAGE),mythtv-backend)
26+
PLATFORMS = linux/amd64
27+
endif
28+
ifeq ($(IMAGE),nagiosql)
29+
PLATFORMS = linux/amd64,linux/arm64,linux/arm/v7
30+
endif
31+
ifeq ($(IMAGE),postfix-python)
32+
# qemu bombs out with cpu_exec assertion since Dec 2023 on arm/v7
33+
PLATFORMS = linux/amd64,linux/aarch64,linux/arm64
34+
endif
35+
ifeq ($(IMAGE),$(filter $(IMAGE),python-builder python-wsgi))
36+
# helm package on arm/v6 isn't supported as of Aug 2021
37+
# others had issues with pipenv hashes Jul 2023
38+
PLATFORMS = linux/amd64,linux/arm64
39+
endif
40+
ifeq ($(IMAGE),spamassassin)
41+
PLATFORMS = linux/amd64,linux/arm64
42+
endif
743

844
analysis: flake8
9-
@echo "Running static analysis"
45+
@echo "Running static analysis"
1046

1147
test: pytest
1248

1349
test_functional:
1450
@echo "Running functional verification of running image"
15-
@echo "--TODO not yet implemented--"
51+
52+
create_image: $(HOME)/.docker/cli-plugins/docker-buildx
53+
docker buildx build --tag $(REGISTRY)/$(IMAGE):$(TAG) --platform $(PLATFORMS) \
54+
$(PUSH) --file Dockerfile . \
55+
--build-arg=VCS_REF=$(CI_COMMIT_SHA) \
56+
--build-arg=BUILD_DATE=$(shell date +%Y-%m-%dT%H:%M:%SZ)
57+
58+
promote_image: $(HOME)/.docker/cli-plugins/docker-buildx
59+
# Log into dockerhub
60+
docker login -u $(USER_LOGIN) -p $(DOCKER_TOKEN)
61+
docker buildx build $(TAG_OPT) \
62+
`[ -e hooks/add_tags ] && hooks/add_tags` \
63+
--tag $(USER_LOGIN)/$(IMAGE):latest --platform $(PLATFORMS) \
64+
--push --file Dockerfile . \
65+
--build-arg=VCS_REF=$(CI_COMMIT_SHA) \
66+
--build-arg=BUILD_DATE=$(shell date +%Y-%m-%dT%H:%M:%SZ)
67+
-if [ -x hooks/post_build ]; then sh hooks/post_build; fi
68+
69+
# TODO update dockerhub README if/when that is supported,
70+
# see https://github.com/docker/hub-feedback/issues/1927
71+
# and https://github.com/docker/hub-feedback/issues/2127
1672

1773
flake8: test_requirements
1874
@echo "Running flake8 code analysis"
@@ -22,12 +78,22 @@ python_env: $(VDIR)/bin/python
2278

2379
test_requirements: python_env
2480
@echo "Installing test requirements"
25-
(. $(VDIR)/bin/activate && \
26-
pip install -r requirements/test.txt -r requirements/common.txt)
81+
(if [ -f requirements/test.txt ]; then \
82+
. $(VDIR)/bin/activate && \
83+
pip install -r requirements/test.txt -r requirements/common.txt; \
84+
fi)
2785

2886
$(VDIR)/bin/python:
2987
@echo "Creating virtual environment"
30-
python3 -m venv --system-site-packages $(VDIR)
88+
virtualenv --system-site-packages $(VENV)
89+
90+
$(HOME)/.docker/cli-plugins/docker-buildx:
91+
mkdir -p $(HOME)/.docker/cli-plugins/
92+
wget -O $(HOME)/.docker/cli-plugins/docker-buildx $(BUILDX)
93+
chmod +x $(HOME)/.docker/cli-plugins/docker-buildx
94+
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
95+
docker buildx create --name multibuild
96+
docker buildx use multibuild
3197

3298
pytest: test_requirements
3399
@echo "Running pytest unit tests"
@@ -43,7 +109,7 @@ pytest: test_requirements
43109

44110
clean:
45111
@echo "Cleaning out generated files"
46-
@rm -rf ./$(SRC)/{.coverage,htmlcov,coverage.xml}
112+
@rm -rf ./app/{.coverage,htmlcov,coverage.xml}
47113
@find . -name \*.pyc -exec rm {} \;
48114
@find . -name \*.log -exec rm {} \;
49115
@find . -name \*~ -exec rm {} \;

images/mysqldump/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ENV HOUR=3 MINUTE=30 \
1818
TZ=UTC
1919
ARG UID=210
2020
ARG BACKUP_GID=34
21-
ARG CLIENT_VERSION=11.4.5-r2
21+
ARG CLIENT_VERSION=11.4.8-r0
2222

2323
RUN RMGROUP=$(grep :$BACKUP_GID: /etc/group | cut -d: -f 1) && \
2424
[ -z "$RMGROUP" ] || delgroup $RMGROUP && \

images/mysqldump/helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ sources:
66
- https://github.com/instantlinux/docker-tools
77
- https://github.com/mariadb/server/tree/10.5/client
88
type: application
9-
version: 0.1.13
10-
appVersion: "11.4.5-r2"
9+
version: 0.1.14
10+
appVersion: "11.4.8-r0"
1111
dependencies:
1212
- name: chartlib
1313
version: 0.1.8

images/postfix-python/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG POSTFIX_VERSION=3.10.4-r0
1+
ARG POSTFIX_VERSION=3.10.5-r0
22

33
FROM instantlinux/postfix:$POSTFIX_VERSION
44
ARG BUILD_DATE

images/postfix-python/helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ sources:
66
- https://github.com/instantlinux/docker-tools
77
- https://github.com/vdukhovni/postfix
88
type: application
9-
version: 0.1.18
10-
appVersion: "3.10.4-r0"
9+
version: 0.1.19
10+
appVersion: "3.10.5-r0"
1111
dependencies:
1212
- name: chartlib
1313
version: 0.1.8

0 commit comments

Comments
 (0)