Skip to content

Commit

Permalink
Merge pull request #1 from scc-digitalhub/nginxUnprivileged
Browse files Browse the repository at this point in the history
Changed docker image to nginx-unprivileged
  • Loading branch information
Calcagiara authored Apr 24, 2024
2 parents 3ba914f + e68f8fa commit 9fc9a3d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 76 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create and publish a Docker image
on:
release:
types: [published]
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Log in to the Container registry
uses: docker/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5.1.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ COPY . .
# Build the project
RUN npm run build

FROM smartcommunitylab/distroless-ngnix as production-build
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
FROM nginxinc/nginx-unprivileged:alpine as production-build

# Copy from the stahg 1
COPY --from=builder /vue-ui/dist /usr/share/nginx/html

EXPOSE 8080
ENTRYPOINT ["nginx", "-e", "/dev/stdout", "-g", "daemon off;"]
ENTRYPOINT ["nginx", "-e", "/dev/stdout", "-g", "daemon off;"]
10 changes: 0 additions & 10 deletions Dockerfile-coder-agent

This file was deleted.

48 changes: 0 additions & 48 deletions Dockerfile-nginx-distroless

This file was deleted.

15 changes: 0 additions & 15 deletions nginx/nginx.conf

This file was deleted.

0 comments on commit 9fc9a3d

Please sign in to comment.