From 405dd9573da979f555d6fe0d8b3ce8405963fc83 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Tue, 3 Oct 2023 14:54:35 +1100 Subject: [PATCH 1/4] deprecate redis-5 --- Makefile | 5 +--- images/redis-persistent/5.Dockerfile | 7 ----- images/redis/5.Dockerfile | 42 ---------------------------- 3 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 images/redis-persistent/5.Dockerfile delete mode 100644 images/redis/5.Dockerfile diff --git a/Makefile b/Makefile index e5301035c..155647d8c 100644 --- a/Makefile +++ b/Makefile @@ -241,8 +241,6 @@ default-versioned-images := mariadb-10.4 \ postgres-11 \ postgres-11-ckan \ postgres-11-drupal \ - redis-5 \ - redis-5-persistent \ mongo-4 ####### @@ -295,8 +293,7 @@ build/postgres-12-drupal: build/postgres-12 build/postgres-13-drupal: build/postgres-13 build/postgres-14-drupal: build/postgres-14 build/postgres-15-drupal: build/postgres-15 -build/redis-5 build/redis-6 build/redis-7: build/commons -build/redis-5-persistent: build/redis-5 +build/redis-6 build/redis-7: build/commons build/redis-6-persistent: build/redis-6 build/redis-7-persistent: build/redis-7 build/varnish-6 build/varnish-7: build/commons diff --git a/images/redis-persistent/5.Dockerfile b/images/redis-persistent/5.Dockerfile deleted file mode 100644 index e525cff2c..000000000 --- a/images/redis-persistent/5.Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/redis-5 - -LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" -LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" - -ENV FLAVOR=persistent diff --git a/images/redis/5.Dockerfile b/images/redis/5.Dockerfile deleted file mode 100644 index 54f928575..000000000 --- a/images/redis/5.Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -# Alpine 3.18 image not available for Redis 5 -FROM redis:5.0.14-alpine3.16 - -LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" -LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" - -ENV LAGOON=redis -ENV FLAVOR=ephemeral - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/wait-for /bin/ -COPY --from=commons /home /home - -RUN fix-permissions /etc/passwd \ - && mkdir -p /home - -RUN apk update \ - && apk add --no-cache tini \ - && rm -rf /var/cache/apk/* - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -COPY conf /etc/redis/ -COPY docker-entrypoint /lagoon/entrypoints/70-redis-entrypoint - -RUN fix-permissions /etc/redis \ - fix-permissions /data - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["redis-server", "/etc/redis/redis.conf"] From b250816243faf97bedbfc6a9253101525dc48b08 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Tue, 3 Oct 2023 14:55:07 +1100 Subject: [PATCH 2/4] deprecate python-3.7 --- Makefile | 3 +-- images/python/3.7.Dockerfile | 40 ------------------------------------ 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 images/python/3.7.Dockerfile diff --git a/Makefile b/Makefile index 155647d8c..846107e24 100644 --- a/Makefile +++ b/Makefile @@ -184,7 +184,6 @@ versioned-images := php-8.0-fpm \ php-8.0-cli-drupal \ php-8.1-cli-drupal \ php-8.2-cli-drupal \ - python-3.7 \ python-3.8 \ python-3.9 \ python-3.10 \ @@ -282,7 +281,7 @@ build/php-8.2-cli: build/php-8.2-fpm build/php-8.0-cli-drupal: build/php-8.0-cli build/php-8.1-cli-drupal: build/php-8.1-cli build/php-8.2-cli-drupal: build/php-8.2-cli -build/python-3.7 build/python-3.8 build/python-3.9 build/python-3.10 build/python-3.11: build/commons +build/python-3.8 build/python-3.9 build/python-3.10 build/python-3.11: build/commons build/node-16 build/node-18 build/node-20: build/commons build/node-16-builder build/node-16-cli: build/node-16 build/node-18-builder build/node-18-cli: build/node-18 diff --git a/images/python/3.7.Dockerfile b/images/python/3.7.Dockerfile deleted file mode 100644 index 20a639895..000000000 --- a/images/python/3.7.Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons - -FROM python:3.7.17-alpine3.18 - -LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" -LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" - -ENV LAGOON=python - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/wait-for /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN fix-permissions /etc/passwd \ - && mkdir -p /home - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk add --no-cache --virtual .build-deps \ - build-base \ - && pip install --upgrade pip \ - && pip install virtualenv==16.7.10 \ - && apk del \ - .build-deps - -# Make sure shells are not running forever -COPY 80-shell-timeout.sh /lagoon/entrypoints/ -RUN echo "source /lagoon/entrypoints/80-shell-timeout.sh" >> /home/.bashrc - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["python"] From 2e10de95d04f7fe78cf29cf06b5c956993c3ea93 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Mon, 30 Oct 2023 09:22:43 +1100 Subject: [PATCH 3/4] deprecate Node.js 16 --- Makefile | 6 +--- images/node-builder/16.Dockerfile | 32 --------------------- images/node-cli/16.Dockerfile | 48 ------------------------------- images/node/16.Dockerfile | 48 ------------------------------- 4 files changed, 1 insertion(+), 133 deletions(-) delete mode 100644 images/node-builder/16.Dockerfile delete mode 100644 images/node-cli/16.Dockerfile delete mode 100644 images/node/16.Dockerfile diff --git a/Makefile b/Makefile index 7f69e3da0..0e1e8c682 100644 --- a/Makefile +++ b/Makefile @@ -192,9 +192,6 @@ versioned-images := php-8.0-fpm \ python-3.9 \ python-3.10 \ python-3.11 \ - node-16 \ - node-16-builder \ - node-16-cli \ node-18 \ node-18-builder \ node-18-cli \ @@ -286,8 +283,7 @@ build/php-8.0-cli-drupal: build/php-8.0-cli build/php-8.1-cli-drupal: build/php-8.1-cli build/php-8.2-cli-drupal: build/php-8.2-cli build/python-3.8 build/python-3.9 build/python-3.10 build/python-3.11: build/commons -build/node-16 build/node-18 build/node-20: build/commons -build/node-16-builder build/node-16-cli: build/node-16 +build/node-18 build/node-20: build/commons build/node-18-builder build/node-18-cli: build/node-18 build/node-20-builder build/node-20-cli: build/node-20 build/postgres-11 build/postgres-12 build/postgres-13 build/postgres-14 build/postgres-15: build/commons diff --git a/images/node-builder/16.Dockerfile b/images/node-builder/16.Dockerfile deleted file mode 100644 index 416f33194..000000000 --- a/images/node-builder/16.Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/node-16 - -LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" -LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" - -ENV LAGOON=node - -RUN apk update \ - && apk add --no-cache \ - libstdc++ \ - && apk add --no-cache \ - bash \ - binutils-gold \ - ca-certificates \ - curl \ - file \ - g++ \ - gcc \ - gcompat \ - git \ - gnupg \ - libgcc \ - libpng-dev \ - linux-headers \ - make \ - openssl \ - python3 \ - wget \ - && rm -rf /var/cache/apk/* - -CMD ["/bin/docker-sleep"] diff --git a/images/node-cli/16.Dockerfile b/images/node-cli/16.Dockerfile deleted file mode 100644 index 8fef0d834..000000000 --- a/images/node-cli/16.Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/node-16 - -LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" -LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" - -ENV LAGOON=node - -RUN apk add --no-cache git \ - unzip \ - gzip \ - bash \ - openssh-client \ - rsync \ - patch \ - procps \ - coreutils \ - mariadb-client \ - mariadb-connector-c \ - postgresql-client \ - mongodb-tools \ - openssh-sftp-server \ - findutils \ - && ln -s /usr/lib/ssh/sftp-server /usr/local/bin/sftp-server \ - && rm -rf /var/cache/apk/* \ - && mkdir -p /home/.ssh \ - && fix-permissions /home/ - - -# We not only use "export $PATH" as this could be overwritten again -# like it happens in /etc/profile of alpine Images. -COPY entrypoints /lagoon/entrypoints/ - -# Make sure shells are not running forever -RUN echo "source /lagoon/entrypoints/80-shell-timeout.sh" >> /home/.bashrc - -# Copy mariadb-client configuration. -COPY mariadb-client.cnf /etc/my.cnf.d/ -RUN fix-permissions /etc/my.cnf.d/ - -# SSH Key and Agent Setup -COPY ssh_config /etc/ssh/ssh_config -COPY id_ed25519_lagoon_cli.key /home/.ssh/lagoon_cli.key -RUN chmod 400 /home/.ssh/lagoon_cli.key -ENV SSH_AUTH_SOCK=/tmp/ssh-agent - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["/bin/docker-sleep"] diff --git a/images/node/16.Dockerfile b/images/node/16.Dockerfile deleted file mode 100644 index 4645cc502..000000000 --- a/images/node/16.Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -ARG IMAGE_REPO -FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM node:16.20-alpine3.18 - -LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" -LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images" - -ENV LAGOON=node - -ARG LAGOON_VERSION -ENV LAGOON_VERSION=$LAGOON_VERSION - -# Copy commons files -COPY --from=commons /lagoon /lagoon -COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/wait-for /bin/ -COPY --from=commons /sbin/tini /sbin/ -COPY --from=commons /home /home - -RUN fix-permissions /etc/passwd \ - && mkdir -p /home \ - && fix-permissions /home \ - && mkdir -p /app \ - && fix-permissions /app - -ENV TMPDIR=/tmp \ - TMP=/tmp \ - HOME=/home \ - # When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` - ENV=/home/.bashrc \ - # When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` - BASH_ENV=/home/.bashrc - -RUN apk update \ - && rm -rf /var/cache/apk/* - -# Make sure Bower and NPM are allowed to be running as root -RUN echo '{ "allow_root": true }' > /home/.bowerrc \ - && echo 'unsafe-perm=true' > /home/.npmrc - -WORKDIR /app - -EXPOSE 3000 - -# tells the local development environment on which port we are running -ENV LAGOON_LOCALDEV_HTTP_PORT=3000 - -ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] -CMD ["yarn", "run", "start"] From 26aa19aeb5f37046aba493eb7af1f89350aee2ef Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Mon, 30 Oct 2023 09:23:34 +1100 Subject: [PATCH 4/4] remove tests for deprecated images --- helpers/TESTING_base_images_dockercompose.md | 19 ----------------- .../TESTING_service_images_dockercompose.md | 16 ++------------ helpers/images-docker-compose.yml | 21 ------------------- helpers/services-docker-compose.yml | 6 ------ 4 files changed, 2 insertions(+), 60 deletions(-) diff --git a/helpers/TESTING_base_images_dockercompose.md b/helpers/TESTING_base_images_dockercompose.md index 1c7bb3c3d..19fc97fc6 100644 --- a/helpers/TESTING_base_images_dockercompose.md +++ b/helpers/TESTING_base_images_dockercompose.md @@ -35,7 +35,6 @@ Run the following commands to validate things are rolling as they should. ```bash # should have all the services we expect docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep commons -docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep node-16 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep node-18 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep node-20 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep php-8-0-dev @@ -44,7 +43,6 @@ docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep php-8-1-prod docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep php-8-2-dev docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep php-8-2-prod -docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep python-3-7 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep python-3-8 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep python-3-9 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep python-3-10 @@ -182,17 +180,6 @@ docker-compose exec -T commons sh -c "curl -kL http://php-8-2-prod:9000" | grep docker-compose exec -T commons sh -c "curl -kL http://php-8-2-prod:9000" | grep "upload_max_filesize" | grep "1024M" docker-compose exec -T commons sh -c "curl -kL http://php-8-2-prod:9000" | grep "error_reporting" | grep "22519" -# python-3-7 should be version 3.7 -docker-compose exec -T python-3-7 sh -c "python -V" | grep "3.7" - -# python-3-7 should have basic tools installed -docker-compose exec -T python-3-7 sh -c "pip list --no-cache-dir" | grep "pip" -docker-compose exec -T python-3-7 sh -c "pip list --no-cache-dir" | grep "setuptools" -docker-compose exec -T python-3-7 sh -c "pip list --no-cache-dir" | grep "virtualenv" | grep "16.7.10" - -# python-3-7 should be serving content -docker-compose exec -T commons sh -c "curl python-3-7:3000/tmp/test" | grep "Python 3.7" - # python-3-8 should be version 3.8 docker-compose exec -T python-3-8 sh -c "python -V" | grep "3.8" @@ -237,12 +224,6 @@ docker-compose exec -T python-3-11 sh -c "pip list --no-cache-dir" | grep "virtu # python-3-10 should be serving content docker-compose exec -T commons sh -c "curl python-3-11:3000/tmp/test" | grep "Python 3.11" -# node-16 should have Node 16 -docker-compose exec -T node-16 sh -c "node -v" | grep "v16" - -# node-16 should be serving content -docker-compose exec -T commons sh -c "curl node-16:3000/test" | grep "v16" - # node-18 should have Node 18 docker-compose exec -T node-18 sh -c "node -v" | grep "v18" diff --git a/helpers/TESTING_service_images_dockercompose.md b/helpers/TESTING_service_images_dockercompose.md index 04b7e1dbc..96cafece8 100644 --- a/helpers/TESTING_service_images_dockercompose.md +++ b/helpers/TESTING_service_images_dockercompose.md @@ -33,6 +33,8 @@ docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp:/ docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://postgres-15:5432 -timeout 1m docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://mongo-4:27017 -timeout 1m docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://rabbitmq:15672 -timeout 1m +docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://redis-6:6379 -timeout 1m +docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://redis-7:6379 -timeout 1m docker run --rm --net all-images_default jwilder/dockerize dockerize -wait tcp://opensearch-2:9200 -timeout 1m ``` @@ -55,7 +57,6 @@ docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-14 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep postgres-15 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep rabbitmq -docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep redis-5 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep redis-6 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep redis-7 docker ps --filter label=com.docker.compose.project=all-images | grep Up | grep solr-7 @@ -76,19 +77,6 @@ docker-compose exec -T rabbitmq sh -c "rabbitmq-plugins list" | grep "E" | grep # rabbitmq should have a running RabbitMQ management page running on 15672 docker-compose exec -T commons sh -c "curl -kL http://rabbitmq:15672" | grep "RabbitMQ Management" -# redis-5 should be running Redis v5.0 -docker-compose exec -T redis-5 sh -c "redis-server --version" | grep v=5. - -# redis-5 should be able to see databases -docker-compose exec -T redis-5 sh -c "redis-cli CONFIG GET databases" - -# redis-5 should have initialized database -docker-compose exec -T redis-5 sh -c "redis-cli dbsize" - -# redis-5 should be able to read/write data -docker-compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/redis-5" | grep "SERVICE_HOST=redis-5" -docker-compose exec -T commons sh -c "curl -kL http://internal-services-test:3000/redis-5" | grep "LAGOON_TEST_VAR=all-images" - # redis-6 should be running Redis v6.0 docker-compose exec -T redis-6 sh -c "redis-server --version" | grep v=6. diff --git a/helpers/images-docker-compose.yml b/helpers/images-docker-compose.yml index ce73cde08..d00c16247 100644 --- a/helpers/images-docker-compose.yml +++ b/helpers/images-docker-compose.yml @@ -10,17 +10,6 @@ services: image: uselagoon/commons:latest << : *default-user # uses the defined user from top - node-16: - image: uselagoon/node-16:latest - ports: - - "3000" - user: root - command: ["sh", "-c", " - npm install -g http-server; - node -v | xargs > /app/test.html; - exec http-server -p 3000 - "] - node-18: image: uselagoon/node-18:latest ports: @@ -142,16 +131,6 @@ services: exec php -S 0.0.0.0:9000 "] # runs a webserver with phpinfo output - python-3-7: - image: uselagoon/python-3.7:latest - ports: - - "3000" - << : *default-user # uses the defined user from top - command: ["sh", "-c", " - python -V | xargs > tmp/test; - exec python -m http.server 3000 - "] - python-3-8: image: uselagoon/python-3.8:latest ports: diff --git a/helpers/services-docker-compose.yml b/helpers/services-docker-compose.yml index 403c26b08..50025e525 100644 --- a/helpers/services-docker-compose.yml +++ b/helpers/services-docker-compose.yml @@ -78,12 +78,6 @@ services: - "15672" << : *default-user # uses the defined user from top - redis-5: - image: uselagoon/redis-5:latest - ports: - - "6379" - << : *default-user # uses the defined user from top - redis-6: image: uselagoon/redis-6:latest ports: