Skip to content

Commit

Permalink
Update Dockerfile.dapper
Browse files Browse the repository at this point in the history
Signed-off-by: David Ko <[email protected]>
  • Loading branch information
innobead authored Jun 17, 2024
1 parent cbd5837 commit 89419e4
Showing 1 changed file with 0 additions and 78 deletions.
78 changes: 0 additions & 78 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<<<<<<< HEAD
FROM registry.suse.com/bci/bci-base:15.5
=======
FROM registry.suse.com/bci/golang:1.22
>>>>>>> f73b9380 (ci: use golang bci instead of manual download)

ARG DAPPER_HOST_ARCH
ARG http_proxy
ARG https_proxy
<<<<<<< HEAD
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
ENV PROTOBUF_VER=3.18.0
=======
>>>>>>> f73b9380 (ci: use golang bci instead of manual download)

ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
ENV PROTOBUF_VER_PY=4.24.3
Expand All @@ -32,37 +23,17 @@ RUN if [ ${ARCH} == "amd64" ]; then \
zypper -n install autoconf libtool libunwind-devel; \
fi

<<<<<<< HEAD
RUN zypper -n install cmake wget curl git less file gcc \
libkmod-devel libnl3-devel linux-glibc-devel pkg-config psmisc tox qemu-tools fuse python3-devel \
=======
# TODO: use default python3 if SLE upgrade system python version to python3.11
RUN zypper -n install cmake curl git less file gcc python311 python311-pip python311-devel \
libkmod-devel libnl3-devel linux-glibc-devel pkg-config psmisc qemu-tools fuse \
>>>>>>> f73b9380 (ci: use golang bci instead of manual download)
bash-completion librdmacm1 librdmacm-utils libibverbs xsltproc docbook-xsl-stylesheets \
perl-Config-General libaio-devel glibc-devel-static glibc-devel sg3_utils iptables libltdl7 \
python3-pip uuid-runtime libdevmapper1_03 iproute2 jq unzip zlib-devel zlib-devel-static \
rpm-build rdma-core-devel gcc-c++ docker && \
rm -rf /var/cache/zypp/*

<<<<<<< HEAD
# needed for ${!var} substitution
RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh

RUN if [ ${ARCH} == "s390x" ]; then \
ln -s /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc;\
fi

# Install Go & tools
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH_s390x=s390x GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
RUN wget -O - https://storage.googleapis.com/golang/go1.21.3.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
go install golang.org/x/lint/golint@latest
=======
# Install golangci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
>>>>>>> f73b9380 (ci: use golang bci instead of manual download)

# Install Minio
ENV MINIO_URL_amd64=https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2021-12-20T22-07-16Z \
Expand All @@ -86,41 +57,10 @@ ENV GRPC_HEALTH_PROBE_amd64=https://github.com/grpc-ecosystem/grpc-health-probe/
RUN curl -sSfL ${!GRPC_HEALTH_PROBE} -o /usr/local/bin/grpc_health_probe && \
chmod +x /usr/local/bin/grpc_health_probe

<<<<<<< HEAD
# protoc
ENV PROTOC_amd64=https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VER}/protoc-${PROTOBUF_VER}-linux-x86_64.zip \
PROTOC_arm64=https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VER}/protoc-${PROTOBUF_VER}-linux-aarch_64.zip \
PROTOC_s390x=https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VER}/protoc-${PROTOBUF_VER}-linux-s390_64.zip \
PROTOC=PROTOC_${ARCH}

RUN cd /usr/src && \
wget ${!PROTOC} -O protoc_${ARCH}.zip && \
unzip protoc_${ARCH}.zip -d /usr/local/

# protoc-gen-go
RUN cd /go/src/github.com/ && \
mkdir golang/ && \
cd golang && \
git clone https://github.com/golang/protobuf.git && \
cd protobuf && \
git checkout v1.3.2 && \
cd protoc-gen-go && \
go build && \
cp protoc-gen-go /usr/local/bin

# python grpc-tools
RUN if [ "${ARCH}" == "s390x" ]; then \
zypper -n in libopenssl-devel && \
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True pip3 install grpcio==1.25.0 grpcio_tools==1.25.0 protobuf==${PROTOBUF_VER}; \
else \
pip3 install grpcio==1.25.0 grpcio_tools==1.25.0 protobuf==${PROTOBUF_VER}; \
fi
=======
# TODO: use default python3 if SLE upgrade system python version to python3.11
RUN ln -sf /usr/bin/python3.11 /usr/bin/python3 & \
ln -sf /usr/bin/pip3.11 /usr/bin/pip3 && \
pip3 install grpcio==1.58.0 grpcio_tools==1.58.0 protobuf==${PROTOBUF_VER_PY}
>>>>>>> f73b9380 (ci: use golang bci instead of manual download)

# buf
ENV GO111MODULE=on
Expand Down Expand Up @@ -148,32 +88,14 @@ RUN mkdir integration/
COPY integration/setup.py integration/tox.ini integration/requirements.txt integration/flake8-requirements.txt integration/

RUN cd integration && \
<<<<<<< HEAD
if [ "${ARCH}" == "s390x" ]; then \
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True tox --notest;\
else \
tox --notest; \
fi
=======
pip3 install tox==4.11.3; \
tox --notest
>>>>>>> f73b9380 (ci: use golang bci instead of manual download)

# Build longhorn-instance-manager for integration testing
RUN cd /go/src/github.com/longhorn && \
git clone https://github.com/longhorn/longhorn-instance-manager.git && \
cd longhorn-instance-manager && \
<<<<<<< HEAD
git checkout v1.5.x && \
go build -o ./longhorn-instance-manager && \
cp -r integration/rpc/ ${DAPPER_SOURCE}/integration/rpc/ && \
cp longhorn-instance-manager /usr/local/bin

VOLUME /tmp
ENV TMPDIR /tmp
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]
=======
go build -o ./longhorn-instance-manager -tags netgo -ldflags "-linkmode external -extldflags -static" && \
install longhorn-instance-manager /usr/local/bin
>>>>>>> f73b9380 (ci: use golang bci instead of manual download)

0 comments on commit 89419e4

Please sign in to comment.