<commit_before>FROM golang:1.16-alpine AS build

RUN apk add --no-cache git gcc musl-dev

WORKDIR /src/

# We want to populate the module cache based on the go.{mod,sum} files.
COPY go.mod go.sum /src/

#This is the ‘magic’ step that will download all the dependencies that are specified in
# the go.mod and go.sum file.
# Because of how the layer caching system works in Docker, the  go mod download
# command will _ only_ be re-run when the go.mod or go.sum file change
# (or when we add another docker instruction this line)
RUN go mod download && go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs go get -v

# Here we copy the rest of the source code
COPY . /src/

# Run the build
RUN go install -v ./...

# This results in a single layer image
FROM alpine
COPY --from=build /go/bin/ipfs-search /usr/local/bin/ipfs-search

CMD ["crawl"]
ENTRYPOINT ["/usr/local/bin/ipfs-search"]<commit_msg>Race condition detection in Docker containers.<commit_after>FROM golang:1.16-alpine AS build

RUN apk add --no-cache git gcc musl-dev

WORKDIR /src/

# We want to populate the module cache based on the go.{mod,sum} files.
COPY go.mod go.sum /src/

#This is the ‘magic’ step that will download all the dependencies that are specified in
# the go.mod and go.sum file.
# Because of how the layer caching system works in Docker, the  go mod download
# command will _ only_ be re-run when the go.mod or go.sum file change
# (or when we add another docker instruction this line)
RUN go mod download && go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs go get -v

# Here we copy the rest of the source code
COPY . /src/

# Run the build
ENV GORACE="halt_on_error=1"
RUN go install -v -race ./...

# This results in a single layer image
FROM alpine
COPY --from=build /go/bin/ipfs-search /usr/local/bin/ipfs-search

CMD ["crawl"]
ENTRYPOINT ["/usr/local/bin/ipfs-search"]
{'fraction_non_alphanumeric': 0.10289389067524116, 'fraction_numerical': 0.005894962486602358, 'mean_word_length': 3.4346793349168645, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2032279', 'n_tokens_mistral': 623, 'n_tokens_neox': 594, 'n_words': 277}