Skip to content

Commit d9139a6

Browse files
committed
Update Dockerfile to match expected directory permissions
1 parent 1959c5c commit d9139a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ RUN apk add --no-cache tini=0.19.0-r3
3737
# - Adds a dedicated non-root group and user for security (using the ARG).
3838
# - Creates necessary directories for configs, logs, and user data.
3939
# - Sets correct ownership for the non-root user.
40+
# Note: ~/.cache/mcpd is created on-demand by the application when needed
41+
# (e.g. ~/.cache/mcpd/registries during 'mcpd add' or 'mcpd search' commands)
42+
# but not during normal daemon operation.
4043
RUN addgroup -S $MCPD_USER && \
4144
adduser -D -S -h $MCPD_HOME -G $MCPD_USER $MCPD_USER && \
4245
mkdir -p \
4346
$MCPD_HOME/.config/mcpd \
4447
/var/log/mcpd \
4548
/etc/mcpd && \
46-
chown -R $MCPD_USER:$MCPD_USER $MCPD_HOME /var/log/mcpd
49+
chmod 700 $MCPD_HOME/.config/mcpd && \
50+
chown -R $MCPD_USER:$MCPD_USER $MCPD_HOME /var/log/mcpd \
4751

4852
# Copy uv/uvx binaries from image.
4953
COPY --from=ghcr.io/astral-sh/uv:0.8.4 /uv /uvx /usr/local/bin/

0 commit comments

Comments
 (0)