Skip to content

Commit bec2bcc

Browse files
committed
fix: Docker permissions in ci
1 parent 5712cea commit bec2bcc

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
HTTPBIN_HTTP_PORT=8080
33
HTTPBIN_HTTPS_PORT=8443
44

5-
# Optional: Set DOCKER_USER for Linux/GitHub Actions
5+
# Optional: Set to your username to avoid file permission issues (macOS/Linux)
6+
# DOCKER_USER=$(whoami)
7+
# Or use numeric UID:GID format
68
# DOCKER_USER=1000:1000

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ jobs:
2828
- otp: '25.3'
2929
rebar3: '3.23.0'
3030

31-
env:
32-
DOCKER_USER: "${{ github.actor }}"
33-
3431
steps:
3532
- name: Checkout
3633
uses: actions/checkout@v4

docker-compose.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ services:
88
build:
99
context: .
1010
dockerfile: Dockerfile.caddy
11-
# In GitHub Actions we want to access the files created
12-
# by Caddy. However, in Linux these end up being owned by root
13-
# because the container by default runs using the root user
14-
# and we are not root in the GH action so we cannot access them.
11+
# For local development, set DOCKER_USER to your username in .env
12+
# to avoid file permission issues. In CI, this defaults to root.
13+
# Example: DOCKER_USER=$(whoami)
1514
user: "${DOCKER_USER:-root}"
1615
environment:
1716
- HTTPBIN_HTTP_PORT=${HTTPBIN_HTTP_PORT:-8080}

0 commit comments

Comments
 (0)