Skip to content

Commit b2df8e4

Browse files
authored
chore: adds unprivileged docker image (#1706)
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
1 parent 55bcf69 commit b2df8e4

7 files changed

Lines changed: 54 additions & 14 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,22 @@ jobs:
5353
path: ./dist
5454

5555
publish-docker:
56-
name: Publish Docker Image
56+
name: Publish ${{ matrix.type }} Image
5757
needs: build
5858
if: ${{ github.event_name != 'pull_request' }}
5959
runs-on: ubuntu-latest
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
include:
64+
- type: Docker
65+
image-name: ${{ github.repository }}
66+
base-image: nginx:alpine
67+
port: 80
68+
- type: Docker Unprivileged
69+
image-name: ${{ github.repository }}-unprivileged
70+
base-image: nginxinc/nginx-unprivileged:alpine
71+
port: 8080
6072
permissions:
6173
id-token: write
6274
contents: read
@@ -77,7 +89,7 @@ jobs:
7789
uses: docker/metadata-action@v5
7890
with:
7991
images: |
80-
ghcr.io/${{ github.repository }}
92+
ghcr.io/${{ matrix.image-name }}
8193
tags: |
8294
type=semver,pattern={{raw}}
8395
type=ref,event=pr
@@ -105,6 +117,9 @@ jobs:
105117
context: .
106118
file: ./Dockerfile
107119
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
120+
build-args: |
121+
BASE_IMAGE=${{ matrix.base-image }}
122+
PORT=${{ matrix.port }}
108123
push: true
109124
sbom: true
110125
provenance: true
@@ -116,7 +131,7 @@ jobs:
116131
- name: Attest Docker image
117132
uses: actions/attest-build-provenance@v2
118133
with:
119-
subject-name: ghcr.io/${{ github.repository }}
134+
subject-name: ghcr.io/${{ matrix.image-name }}
120135
subject-digest: ${{ steps.docker_push.outputs.digest }}
121136
push-to-registry: true
122137

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
FROM nginx:alpine
1+
ARG BASE_IMAGE=nginx:alpine
2+
ARG PORT=80
23

3-
ENV PORT=80
4+
FROM $BASE_IMAGE
5+
6+
ARG PORT
7+
8+
ENV PORT=$PORT
49

510
COPY /dist /usr/share/nginx/html
611
COPY /server/nginx /etc/nginx/templates

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ Older releases can be found [here](https://github.com/fluidd-core/fluidd/release
3131

3232
## Docker support
3333

34-
We have an [official docker image](https://github.com/fluidd-core/fluidd/pkgs/container/fluidd). This is updated for each release and on each commit.
34+
We have an [official docker image](https://github.com/fluidd-core/fluidd/pkgs/container/fluidd), serving Fluidd by default on port 80.
35+
36+
For those who have specific security requirements and need/want to run an unprivileged container, we also have an [unprivileged docker image](https://github.com/fluidd-core/fluidd/pkgs/container/fluidd-unprivileged) available, serving Fluidd by default on port 8080.
37+
38+
You can override the default port where Fluidd will be served by setting the `PORT` environment variable when starting the docker container.
39+
40+
Both of these docker images are updated for each release and on each commit.
3541

3642
## Official sponsors
3743

docs/index.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ firmware.
3030
- [Notifications](/features/notifications) on Pi throttling + more
3131
- [Macro organization](/features/macros)
3232
- Full [localization](/development/localization) (i18n) support
33-
- View and Edit your Klipper config in app with code folding and Codelens support
33+
- View and Edit your Klipper config in app with code folding and Codelens
34+
support
3435
- View and Edit your Gcode files in app
3536
- [Bed Mesh](/features/bed_mesh) levelling
3637
- [Multiple extruder](/features/multiple_extruders) configurations
@@ -44,16 +45,20 @@ firmware.
4445

4546
## Supporting Fluidd
4647

47-
Fluidd development is driven by passionate volunteers who dedicate their time to improving and expanding its capabilities.
48+
Fluidd development is driven by passionate volunteers who dedicate their time to
49+
improving and expanding its capabilities.
4850

49-
Your sponsorship can help us enhance Fluidd, introduce new features, and ensure it remains accessible to all Klipper users.
51+
Your sponsorship can help us enhance Fluidd, introduce new features, and ensure
52+
it remains accessible to all Klipper users.
5053

51-
Your support can make a significant impact on the evolution of Fluidd. Please consider [sponsoring Fluidd](https://github.com/sponsors/fluidd-core).
54+
Your support can make a significant impact on the evolution of Fluidd. Please
55+
consider [sponsoring Fluidd](https://github.com/sponsors/fluidd-core).
5256

5357
## Docker
5458

55-
Fluidd ships with Docker support built in. The official docker can be found
56-
[here](https://github.com/fluidd-core/fluidd/pkgs/container/fluidd), and further information can be found [here](/installation/docker).
59+
Fluidd ships with Docker support built in. The official docker image can be
60+
found [here](https://github.com/fluidd-core/fluidd/pkgs/container/fluidd), and
61+
further information can be found [here](/installation/docker).
5762

5863
## Need help?
5964

docs/installation/docker.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@ Fluidd can be hosted with Docker. This is considered an advanced install, but
1515
gives you the benefit of hosting a single instance of Fluidd, and having it
1616
connect to multiple printers.
1717

18-
The docker image is updated automatically with each release of Fluidd, and
19-
on each commit to the "master" or "develop" branches.
18+
We have an [official docker image](https://github.com/fluidd-core/fluidd/pkgs/container/fluidd),
19+
serving Fluidd by default on port 80.
20+
21+
For those who have specific security requirements and need/want to run an
22+
unprivileged container, we also have an [unprivileged docker image](https://github.com/fluidd-core/fluidd/pkgs/container/fluidd-unprivileged)
23+
available, serving Fluidd by default on port 8080.
24+
25+
You can override the default port where Fluidd will be served by setting the
26+
`PORT` environment variable when starting the docker container.
27+
28+
Both of these docker images are updated for each release and on each commit.
2029

2130
This is a list of the available docker image tags:
2231

File renamed without changes.

0 commit comments

Comments
 (0)