<commit_before># Start from an Alpine image with the latest version of Go installed
FROM golang:alpine

# Install git
RUN apk update && apk add git

# Copy the local package files to the container's workspace.
ADD . /go/src/github.com/snagles/docker-registry-manager/

# Build the application inside the container
WORKDIR $GOPATH/src/github.com/snagles/docker-registry-manager/app
RUN go build .

# Run the app by default when the container starts
CMD /go/src/github.com/snagles/docker-registry-manager/app/app<commit_msg>Multi-stage Dockerfile with config volume.<commit_after># Start from an Alpine image with the latest version of Go installed
FROM golang:alpine as build-env

# Install git
RUN apk add --no-cache git

WORKDIR $GOPATH/src/github.com/snagles/docker-registry-manager

# Copy the local package files to the container's workspace.
ADD . ./

# Build the application inside the container
RUN go install github.com/snagles/docker-registry-manager/app


# Distribution image
FROM alpine:3.7

# Copy binary from build stage
COPY --from=build-env /go/bin/app /app/docker-registry-manager

# Set the default config location
ENV REGISTRY_CONFIG /var/lib/docker-registry-manager
# Config storage volume for persistent settings
VOLUME ["/var/lib/docker-registry-manager"]

# Run the app by default when the container starts
CMD /app/docker-registry-manager
{'fraction_non_alphanumeric': 0.08223201174743025, 'fraction_numerical': 0.0014684287812041115, 'mean_word_length': 4.387351778656127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3538241', 'n_tokens_mistral': 411, 'n_tokens_neox': 389, 'n_words': 145}