fix: ensure config directory exists
- Create config directory in Dockerfile - Use explicit volume bind mount syntax - Fix config.yml mounting issue
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
FROM registry:2 AS base
|
FROM registry:2
|
||||||
|
|
||||||
# Use Alpine's apk package manager to install apache2-utils
|
# Use Alpine's apk package manager to install apache2-utils
|
||||||
RUN apk --no-cache add apache2-utils
|
RUN apk --no-cache add apache2-utils
|
||||||
|
|
||||||
|
# Create config directory
|
||||||
|
RUN mkdir -p /etc/docker/registry/
|
||||||
@@ -2,16 +2,16 @@ version: '3.8'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
registry:
|
registry:
|
||||||
build:
|
build: .
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: registry
|
container_name: registry
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
expose:
|
expose:
|
||||||
- "5000"
|
- "5000"
|
||||||
volumes:
|
volumes:
|
||||||
- registry-data:/var/lib/registry
|
- registry-data:/var/lib/registry
|
||||||
- ./config.yml:/etc/docker/registry/config.yml
|
- type: bind
|
||||||
|
source: ./config.yml
|
||||||
|
target: /etc/docker/registry/config.yml
|
||||||
networks:
|
networks:
|
||||||
- registry-network
|
- registry-network
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user