Pull to refresh
Контейнерум
Контейнерум

Есть один отличный инструмент – это container-structure-test. Используется для функционального тестирования образов Docker и отлично интегрируется с container-tools, который я никогда не устану пиарить :).

То есть пишется скрипт-обертка, который запускает для нужного образа тесты:

./scripts/test.py --image <IMAGE ID> --config test/debian11-nodejs-23.11.0.yaml

То есть сначала собираем базовый образ, а затем сразу его тестируем.

Usage: make <target>

  help               - Display this help message
  all                - Build all Debian images
  check-dependencies - Verify required tools are installed
  clean              - Remove all build artifacts and downloads
  list-vars          - List all Makefile variables and their origins
  shellcheck         - Validate all bash scripts
  package   	     - Create tar.gz archive of the directory
  release            - Create Git tag and GitHub release
  archive            - Create git archive of HEAD
  bundle             - Create git bundle of repository
  test               - Run structure tests on built container images

 ============================
  ** Debian Linux targets **
 ============================

|all|

|debian11|
|debian11-java|
|debian11-java-slim|
|debian11-corretto|
|debian11-graal|
|debian11-graal-slim|
|debian11-java-slim-maven|
|debian11-java-slim-gradle|
|debian11-graal-slim-maven|
|debian11-graal-slim-gradle|

|debian11-java-kafka|
|debian11-java-slim-kafka|

|debian11-nodejs-23.11.0|

|debian11-python-3.9.18|

И никаких проблем и хлопот.

Что такое container-structure-test

Tags:
+2
Comments0

Articles