Skip to content

Commit

Permalink
Add: openvas old stable. (#66)
Browse files Browse the repository at this point in the history
## What
Add a new docker image for openvas-smb based on debian:oldstable
Jira: SC-865
<!--
  Describe what changes are being made, e.g. which feature/bug is being
  developed/fixed in this PR? How did you verify the changes in this PR?
-->

## Why

<!-- Describe why are these changes necessary? -->

## References

<!-- Add identifier for issue tickets, links to other PRs, etc. -->

## Checklist

<!-- Remove this section if not applicable to your changes -->

- [ ] Tests
  • Loading branch information
jjnicola authored Jun 27, 2023
2 parents 2c1686d + 0af5e07 commit 9a91965
Show file tree
Hide file tree
Showing 2 changed files with 53 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
29 changes: 29 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,32 @@ 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: |
# for the images provided for debian:oldstable we just provide
# oldstable on an new version or oldstable-edge when it is on main.
# oldstable-branch-sha on a branch
type=raw,value=oldstable,enable=${{ env.IS_LATEST_TAG }}
# if we are on the main branch set edge
type=raw,value=oldstable-edge,enable=${{ github.ref_name == 'main' }}
# use branch-sha otherwise for pushes to branches other then main (will not be uploaded)
type=raw,value=oldstable-{{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 9a91965

Please sign in to comment.