Dockerfile.test
FROM golang:1.23-alpine
LABEL maintainer="CyberArk Software Ltd."
LABEL id="secrets-provider-for-k8s-test-runner"
# On CyberArk dev laptops, golang module dependencies are downloaded with a
# corporate proxy in the middle. For these connections to succeed we need to
# configure the proxy CA certificate in build containers.
#
# To allow this script to also work on non-CyberArk laptops where the CA
# certificate is not available, we copy the (potentially empty) directory
# and update container certificates based on that, rather than rely on the
# CA file itself.
COPY build_ca_certificate /usr/local/share/ca-certificates/
RUN update-ca-certificates
WORKDIR /secrets-provider-for-k8s
RUN apk add -u --no-cache curl \
gcc \
git \
mercurial \
musl-dev
COPY go.mod go.sum /secrets-provider-for-k8s/
COPY . .
ENTRYPOINT [ "go", "test", "-v", "-timeout", "3m" ]