- Use printf for proper YAML formatting - Add explicit config path to command - Add config directory creation step
10 lines
371 B
Docker
10 lines
371 B
Docker
FROM registry:2
|
|
|
|
# Use Alpine's apk package manager to install apache2-utils
|
|
RUN apk --no-cache add apache2-utils
|
|
|
|
# Create config directory
|
|
RUN mkdir -p /etc/docker/registry
|
|
|
|
# Create config file with proper YAML formatting
|
|
RUN printf "version: 0.1\nstorage:\n filesystem:\n rootdirectory: /var/lib/registry\nhttp:\n addr: :5000\n" > /etc/docker/registry/config.yml |