forked from ceph/ceph-csi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.test
More file actions
69 lines (62 loc) · 1.94 KB
/
Dockerfile.test
File metadata and controls
69 lines (62 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 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 quay.io/fedora/fedora:latest
ARG GOPATH=/go
ARG GOROOT=/usr/local/go
ARG GOARCH
ENV \
GOPATH=${GOPATH} \
GOROOT=${GOROOT} \
GO111MODULE=on \
CEPHCSIPATH=/go/src/github.com/ceph/ceph-csi \
PATH="${GOPATH}/bin:${GOROOT}/bin:/opt/commitlint/node_modules/.bin:${PATH}"
COPY build.env /
RUN mkdir -p /etc/selinux && touch /etc/selinux/config
RUN set -x \
&& source /build.env \
&& \
( test -n "${GOARCH}" && exit 0; echo -e "\n\nMissing GOARCH argument for building image, install Golang or run: make containerized-test GOARCH=amd64\n\n"; exit 1 ) \
&& dnf -y install \
git \
make \
gcc \
findutils \
awk \
librados-devel \
libcephfs-devel \
librbd-devel \
openssl \
ruby-devel \
rubygems \
ShellCheck \
codespell \
yamllint \
npm \
diffutils \
python3-prettytable \
pylint \
&& dnf -y update \
&& dnf -y clean all \
&& gem install mdl \
&& mkdir -p ${GOROOT} \
&& curl -L https://go.dev/dl/go${GOLANG_VERSION}.linux-${GOARCH}.tar.gz \
| tar xzf - -C ${GOROOT} --strip-components=1 \
&& go version \
&& curl -sf "https://raw.githubusercontent.com/golangci/golangci-lint/${GOLANGCI_VERSION}/install.sh" \
| bash -s -- -b ${GOPATH}/bin "${GOLANGCI_VERSION}" \
&& curl -L "${HELM_SCRIPT}" | bash -s -- --version "${HELM_VERSION}" \
&& mkdir /opt/commitlint && pushd /opt/commitlint \
&& npm init -y \
&& npm install @commitlint/cli@"${COMMITLINT_VERSION}" \
&& popd \
&& git config --global --add safe.directory ${CEPHCSIPATH} \
&& go install github.com/augmentable-dev/tickgit/cmd/tickgit@latest \
&& true
WORKDIR ${CEPHCSIPATH}