Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN \
ENV ALLOW_RESTARTS=0 \
ALLOW_STOP=0 \
ALLOW_START=0 \
ALLOW_PAUSE=0 \
ALLOW_UNPAUSE=0 \
AUTH=0 \
BUILD=0 \
COMMIT=0 \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN \
ENV ALLOW_RESTARTS=0 \
ALLOW_STOP=0 \
ALLOW_START=0 \
ALLOW_PAUSE=0 \
ALLOW_UNPAUSE=0 \
AUTH=0 \
BUILD=0 \
COMMIT=0 \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.riscv64
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN \
ENV ALLOW_RESTARTS=0 \
ALLOW_STOP=0 \
ALLOW_START=0 \
ALLOW_PAUSE=0 \
ALLOW_UNPAUSE=0 \
AUTH=0 \
BUILD=0 \
COMMIT=0 \
Expand Down
5 changes: 5 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ full_custom_readme: |
- ALLOW_START=0 #optional
- ALLOW_STOP=0 #optional
- ALLOW_RESTARTS=0 #optional
- ALLOW_PAUSE=0 #optional
- ALLOW_RESUME=0 #optional
- AUTH=0 #optional
- BUILD=0 #optional
- COMMIT=0 #optional
Expand Down Expand Up @@ -176,6 +178,8 @@ full_custom_readme: |
| `-e ALLOW_START=0` | `/containers/{id}/start` - **This option will work even if `POST=0`** |
| `-e ALLOW_STOP=0` | `/containers/{id}/stop` - **This option will work even if `POST=0`** |
| `-e ALLOW_RESTARTS=0` | `/containers/{id}/stop`, `/containers/{id}/restart`, and `/containers/{id}/kill` - **This option will work even if `POST=0`** |
| `-e ALLOW_PAUSE=0` | `/containers/{id}/pause` - **This option will work even if `POST=0`** |
| `-e ALLOW_UNPAUSE=0` | `/containers/{id}/unpause` - **This option will work even if `POST=0`** |
| `-e AUTH=0` | `/auth` |
| `-e BUILD=0` | `/build` |
| `-e COMMIT=0` | `/commit` |
Expand Down Expand Up @@ -326,6 +330,7 @@ full_custom_readme: |

## Versions

* **24.02.26:** - Add `ALLOW_PAUSE` and `ALLOW_UNPAUSE`.
* **26.12.25:** - Rebase to Alpine 3.23.
* **19.08.25:** - Add tzdata for localised logging timestamps.
* **03.06.25:** - Rebase to Alpine 3.22. Add RISCV support.
Expand Down
2 changes: 2 additions & 0 deletions root/templates/haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ frontend proxy
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/((stop)|(restart)|(kill)) } { env(ALLOW_RESTARTS) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/start } { env(ALLOW_START) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/stop } { env(ALLOW_STOP) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/pause } { env(ALLOW_PAUSE) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/unpause } { env(ALLOW_UNPAUSE) -m bool }
http-request deny unless METH_GET || { env(POST) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/auth } { env(AUTH) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/build } { env(BUILD) -m bool }
Expand Down