Skip to content

Commit

Permalink
Add: openvas old stable.
Browse files Browse the repository at this point in the history
Add a new docker image for openvas-smb based on debian:oldstable
  • Loading branch information
jjnicola committed Jun 23, 2023
1 parent 2c1686d commit 7cd46f0
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .docker/prod-oldstable.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ARG VERSION=latest

FROM debian:oldstable-slim AS build
COPY . /source
RUN sh /source/.github/install-openvas-smb-dependencies.sh

RUN cmake -DCMAKE_BUILD_TYPE=Release -B/build /source
RUN DESTDIR=/install cmake --build /build -- install

FROM debian:oldstable-slim

RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
libgnutls30 \
libgssapi3-heimdal \
libkrb5-26-heimdal \
libasn1-8-heimdal \
libroken18-heimdal \
libhdb9-heimdal \
libpopt0 \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /install/ /

RUN ldconfig
33 changes: 33 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,36 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: 'Setup meta information (IS_VERSION_TAG: ${{ env.IS_VERSION_TAG }}, IS_LATEST_TAG: ${{ env.IS_LATEST_TAG }} )'
id: meta-oldstable
uses: docker/metadata-action@v4
with:
images: ${{ github.repository }}
labels: |
org.opencontainers.image.vendor=Greenbone
org.opencontainers.image.base.name=debian:oldstable-slim
flavor: latest=false # no auto latest container tag for git tags
tags: |
# when IS_LATEST_TAG is set create a stable and a latest tag
type=raw,value=latest,enable=${{ env.IS_LATEST_TAG }}
type=raw,value=stable,enable=${{ env.IS_LATEST_TAG }}
# if tag version is set than create a version tags
type=semver,pattern={{version}},enable=${{ env.IS_VERSION_TAG }}
type=semver,pattern={{major}}.{{minor}},enable=${{ env.IS_VERSION_TAG }}
type=semver,pattern={{major}},enable=${{ env.IS_VERSION_TAG }}
# if we are on the main branch set edge
type=edge,branch=main
# use branch-sha otherwise for pushes to branches other then main (will not be uploaded)
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref_type == 'branch' && github.event_name == 'push' && github.ref_name != 'main' }}
# use pr-$PR_ID for pull requests (will not be uploaded)
type=ref,event=pr
- name: Build and push Container image oldstable
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' && (github.ref_type == 'tag' || github.ref_name == 'main') }}
file: .docker/prod-oldstable.Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-oldstable.outputs.tags }}
labels: ${{ steps.meta-oldstable.outputs.labels }}

0 comments on commit 7cd46f0

Please sign in to comment.