Skip to content

Added expanding environment variables for allow* methods - #48

Open
AlexSat wants to merge 1 commit into
wollomatic:49-fr-added-expanding-environment-variables-for-allow-methodsfrom
AlexSat:main
Open

Added expanding environment variables for allow* methods#48
AlexSat wants to merge 1 commit into
wollomatic:49-fr-added-expanding-environment-variables-for-allow-methodsfrom
AlexSat:main

Conversation

@AlexSat

@AlexSatAlexSat commented Apr 2, 2025

Copy link
Copy Markdown

Allow to place environment variable into allow* variables content for future expanding when starting to grant permissions for target container only.

Use case(for docker ocmpose): set environments
SP_ALLOW_POST=/v1\.\d{1,2}/(exec|containers)/$$CONTAINER_NAME/(start|stop|exec)
CONTAINER_NAME=xxx

More complex example:

#cat exts.yaml
services:
docker-proxy:
image: wollomatic/socket-proxy:1
restart: unless-stopped
read_only: true
mem_limit: 64M
hostname: docker_proxy
security_opt:
- no-new-privileges
user: 65534:${DOCKER_GROUP_ID}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- SP_LISTENIP=0.0.0.0
- SP_LOGLEVEL=INFO
- SP_PROXYPORT=${DOCKER_PROXY_PORT}
networks:
- docker_proxy_net
docker-proxy-start-stop:
extends: docker-proxy
environment:
- SP_ALLOW_POST=/v1\.\d{1,2}/containers/$$TARGET_CONTAINER/(start|stop)
docker-proxy-start-stop-exec:
extends: docker-proxy
environment:
- SP_ALLOW_POST=/v1\.\d{1,2}/(exec|containers)/$$TARGET_CONTAINER/(start|stop|exec)
- SP_ALLOW_GET=/v1\.\d{1,2}/(exec|containers)/.*?/(json)
#cat compose.yml
services:
...
docker_socket:
extends:
file: exts.yml
service: docker-proxy-start-stop
environment:
- SP_ALLOWFROM=my_app_backup
- TARGET_CONTAINER=my_app

@AlexSat

AlexSat commented Apr 2, 2025

Copy link
Copy Markdown
Author

@wollomatic Hello! What do you think about it?

UPD: Sorry, misstag... removed @justsomescripts @ildyria

@wollomatic
wollomatic changed the base branch from main to 49-fr-added-expanding-environment-variables-for-allow-methodsApril 2, 2025 17:21
@wollomaticwollomatic self-assigned this Apr 2, 2025
@wollomatic

Copy link
Copy Markdown
Owner

Hi @AlexSat,

thank you very much for your contribution. I'll think about it in the next few days and get back to you soon.

Best regards,
Wolfgang

@AlexSat

Copy link
Copy Markdown
Author

Hi @wollomatic,

have you some time to check PR, please?

Best regards,
Alexander

@wollomatic
wollomatic deleted the branch wollomatic:49-fr-added-expanding-environment-variables-for-allow-methodsSeptember 30, 2025 17:24
@wollomaticwollomatic reopened this Sep 30, 2025
@wollomatic
wollomatic deleted the branch wollomatic:49-fr-added-expanding-environment-variables-for-allow-methodsFebruary 21, 2026 14:16
@wollomaticwollomatic reopened this Feb 21, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@AlexSat@wollomatic