From b23846cbcfc0d3e37ceec7f1c796ac22e1b9df6b Mon Sep 17 00:00:00 2001 From: renzaspiras Date: Wed, 5 Nov 2025 09:28:49 -0800 Subject: [PATCH] fix: ensure config directory exists - Create config directory in Dockerfile - Use explicit volume bind mount syntax - Fix config.yml mounting issue --- Dockerfile | 7 +++++-- docker-compose.yml | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 38b048c..0b39750 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ -FROM registry:2 AS base +FROM registry:2 # Use Alpine's apk package manager to install apache2-utils -RUN apk --no-cache add apache2-utils \ No newline at end of file +RUN apk --no-cache add apache2-utils + +# Create config directory +RUN mkdir -p /etc/docker/registry/ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index cefd6f8..aeb0301 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,16 +2,16 @@ version: '3.8' services: registry: - build: - context: . - dockerfile: Dockerfile + build: . container_name: registry restart: unless-stopped expose: - "5000" volumes: - registry-data:/var/lib/registry - - ./config.yml:/etc/docker/registry/config.yml + - type: bind + source: ./config.yml + target: /etc/docker/registry/config.yml networks: - registry-network