From dd63dc3ea57d134247a46ec2982894f36f425a3d Mon Sep 17 00:00:00 2001 From: William Shelley Date: Tue, 17 Dec 2024 10:00:49 +0000 Subject: [PATCH] feat: add logstash image (#53) * feat: add logstash directories and amend CI/CD workflows * feat: added logstash dockerfile * fix: hadolint errors * fix: remove apt update * fix: test root user * fix: setting final user * fix: use correct versions * fix: versions again * fix: formatting * feat: add lables with description and install sinatra v4.1.0 * fix: hadolint error * fix: typo * fix: sinatra build in layer * fix: sinatra build hadolint error * fix: sinatra build hadolint error * fix: hadolint error on ruby install * fix: stripping out sinatra update breaks everything --------- Co-authored-by: laurence.barker@dvsa.gov.uk --- .github/workflows/cd.yaml | 2 ++ .github/workflows/ci.yaml | 2 ++ logstash/8.16.0/batch/Dockerfile | 15 +++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 logstash/8.16.0/batch/Dockerfile diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 3387f17..e0d92e9 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -72,12 +72,14 @@ jobs: - php/8.3/fpm-nginx - php/8.2/cli - php/8.3/cli + - logstash/8.16.0/batch exclude: - base: ${{ github.event_name == 'schedule' || needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/8.2/fpm-nginx') && 'ignored' || 'php/8.2/fpm-nginx' }} - base: ${{ github.event_name == 'schedule' || needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/8.2/fpm-apache') && 'ignored' || 'php/8.2/fpm-apache' }} - base: ${{ github.event_name == 'schedule' || needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/8.3/fpm-nginx') && 'ignored' || 'php/8.3/fpm-nginx' }} - base: ${{ github.event_name == 'schedule' || needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/8.2/cli') && 'ignored' || 'php/8.2/cli' }} - base: ${{ github.event_name == 'schedule' || needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'php/8.3/cli') && 'ignored' || 'php/8.3/cli' }} + - base: ${{ github.event_name == 'schedule' || needs.release-please.outputs.release_created || contains(needs.orchestrator.outputs.changed-directories, 'logstash/8.16.0/batch') && 'ignored' || 'logstash/8.16.0/batch' }} uses: ./.github/workflows/docker.yaml with: image-version: ${{ (needs.release-please.outputs.release_created || github.event_name == 'schedule') && needs.release-please.outputs.tag_name || github.sha }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2a5eddb..d109427 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,12 +38,14 @@ jobs: - php/8.3/fpm-nginx - php/8.2/cli - php/8.3/cli + - logstash/8.16.0/batch exclude: - base: ${{ contains(needs.orchestrator.outputs.changed-directories, 'php/8.2/fpm-nginx') && 'ignored' || 'php/8.2/fpm-nginx' }} - base: ${{ contains(needs.orchestrator.outputs.changed-directories, 'php/8.2/fpm-apache') && 'ignored' || 'php/8.2/fpm-apache' }} - base: ${{ contains(needs.orchestrator.outputs.changed-directories, 'php/8.3/fpm-nginx') && 'ignored' || 'php/8.3/fpm-nginx' }} - base: ${{ contains(needs.orchestrator.outputs.changed-directories, 'php/8.2/cli') && 'ignored' || 'php/8.2/cli' }} - base: ${{ contains(needs.orchestrator.outputs.changed-directories, 'php/8.3/cli') && 'ignored' || 'php/8.3/cli' }} + - base: ${{ contains(needs.orchestrator.outputs.changed-directories, 'logstash/8.16.0/batch') && 'ignored' || 'logstash/8.16.0/batch' }} uses: ./.github/workflows/docker.yaml with: image-version: ${{ github.event.pull_request.head.sha }} diff --git a/logstash/8.16.0/batch/Dockerfile b/logstash/8.16.0/batch/Dockerfile new file mode 100644 index 0000000..de0ad4e --- /dev/null +++ b/logstash/8.16.0/batch/Dockerfile @@ -0,0 +1,15 @@ +FROM logstash:8.16.0 + +LABEL version="1.0" +LABEL description="Dockerfile with logstash with Sinatra and MySQL client for VOL" + +USER root + +RUN apt-get update && \ + apt-get -y --no-install-recommends install \ + curl=7.68.0-1ubuntu2.24 \ + default-mysql-client=1.0.5ubuntu2 && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +USER 1000 \ No newline at end of file