Skip to content

Commit

Permalink
Reorganize repository
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyTran732 authored Sep 9, 2024
1 parent f3b8a1a commit aabb140
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 26 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
push:
branches:
- slim
# Ignore Markdown files
paths-ignore:
- '**.md'
paths:
- '.github/workflows/build-slim.yml'
- 'mainline-slim/**'
schedule:
# Build the image daily
- cron: '15 0 * * *'
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
context: mainline-slim
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
category: trivy
category: trivy-slim

grype:
name: Scan current image with Grype
Expand All @@ -106,4 +106,4 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.grype.outputs.sarif }}
category: grype
category: grype-slim
16 changes: 8 additions & 8 deletions .github/workflows/build-unprivileged-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
workflow_dispatch:
push:
branches:
- unprivileged-slim
# Ignore Markdown files
paths-ignore:
- '**.md'
- main
paths:
- '.github/workflows/build-unprivileged-slim.yml'
- 'mainline-unprivileged-slim/**'
schedule:
# Build the image daily
- cron: '15 0 * * *'
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
context: mainline-unprivileged-slim
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
category: trivy
category: trivy-unprivileged-slim

grype:
name: Scan current image with Grype
Expand All @@ -97,7 +97,7 @@ jobs:
steps:
- name: Run Grype vulnerability scanner
uses: anchore/scan-action@v4
id: grype
id: grype-unprivileged-slim
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
fail-build: false
Expand All @@ -106,4 +106,4 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.grype.outputs.sarif }}
category: grype
category: grype-unprivileged-slim
16 changes: 8 additions & 8 deletions .github/workflows/build-unprivileged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
workflow_dispatch:
push:
branches:
- unprivileged
# Ignore Markdown files
paths-ignore:
- '**.md'
- main
paths:
- '.github/workflows/build-unprivileged.yml'
- 'mainline-unprivileged/**'
schedule:
# Build the image daily
- cron: '15 0 * * *'
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
context: mainline-unprivileged
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
category: trivy
category: trivy-unprivileged

grype:
name: Scan current image with Grype
Expand All @@ -97,7 +97,7 @@ jobs:
steps:
- name: Run Grype vulnerability scanner
uses: anchore/scan-action@v4
id: grype
id: grype-unprivileged
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
fail-build: false
Expand All @@ -106,4 +106,4 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.grype.outputs.sarif }}
category: grype
category: grype-unprivileged
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
push:
branches:
- main
# Ignore Markdown files
paths-ignore:
- '**.md'
paths:
- '.github/workflows/build.yml'
- 'mainline/**'
schedule:
# Build the image daily
- cron: '15 0 * * *'
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
context: mainline
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
10 changes: 10 additions & 0 deletions mainline-slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM nginx:mainline-alpine-slim

LABEL maintainer="Thien Tran [email protected]"

RUN apk -U upgrade \
&& apk add libstdc++ \
&& rm -rf /var/cache/apk/*

COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
14 changes: 14 additions & 0 deletions mainline-unprivileged-slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ghcr.io/nginxinc/nginx-unprivileged:mainline-alpine-slim

LABEL maintainer="Thien Tran [email protected]"

USER root

RUN apk -U upgrade \
&& apk add libstdc++ \
&& rm -rf /var/cache/apk/*

COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"

USER $UID
10 changes: 10 additions & 0 deletions mainline-unprivileged/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM nginx:mainline-alpine

LABEL maintainer="Thien Tran [email protected]"

RUN apk -U upgrade \
&& apk add libstdc++ \
&& rm -rf /var/cache/apk/*

COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
File renamed without changes.

0 comments on commit aabb140

Please sign in to comment.