ceph-csi/scripts/Dockerfile.test
Niels de Vos 65a2794e60 ci: add 'make test' target to validate CI job scripts
This merges several files from the master branch into ci/centos so that
the scripts, MarkDown and yaml files can be checked.

Run 'make' or 'make test' to validate the contents of this branch.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-05-27 12:52:21 +02:00

48 lines
1.2 KiB
Docker

# Container image for running the Ceph-CSI tests
#
# This container is based on Fedora so that recent versions of tools can easily
# be installed.
#
# Production containers are based one ceph/ceph:latest, which use CentOS as
# Operating System, so generated binaries and versions of dependencies may be a
# little different.
#
FROM fedora:latest
ARG GOLANGCI_VERSION=v1.21.0
ARG GOSEC_VERSION=2.0.0
ARG GOPATH=/go
ENV \
GOPATH=${GOPATH} \
GO111MODULE=on \
PATH="${GOPATH}/bin:/opt/commitlint/node_modules/.bin:${PATH}"
RUN dnf -y install \
git \
make \
golang \
gcc \
librados-devel \
librbd-devel \
rubygems \
ShellCheck \
yamllint \
npm \
&& dnf -y update \
&& dnf -y clean all \
&& gem install mdl \
&& curl -sf "https://install.goreleaser.com/github.com/golangci/golangci-lint.sh" \
| bash -s -- -b ${GOPATH}/bin "${GOLANGCI_VERSION}" \
&& curl -sfL "https://raw.githubusercontent.com/securego/gosec/master/install.sh" \
| sh -s -- -b $GOPATH/bin "${GOSEC_VERSION}" \
&& curl -L https://git.io/get_helm.sh | bash \
&& mkdir /opt/commitlint && pushd /opt/commitlint \
&& npm init -y \
&& npm install @commitlint/cli \
&& popd \
&& true
WORKDIR /go/src/github.com/ceph/ceph-csi