blob: 24d077fd85939165716a3ce8a791ed3179f33a23 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM quay.io/centos/centos:8
RUN dnf -q -y update && dnf -q clean all
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
RUN dnf -y install sudo git make cmake gcc-c++ jsoncpp-devel python3-devel maven java-11-openjdk-devel nodejs-devel dotnet-sdk-5.0
RUN dnf -y install qpid-proton-cpp-devel python3-qpid-proton qpid-dispatch-router
RUN JAVA_11=$(alternatives --display java | grep 'family java-11-openjdk' | cut -d' ' -f1) && \
alternatives --set java ${JAVA_11} && \
JAVAC_11=$(alternatives --display javac | grep 'family java-11-openjdk' | cut -d' ' -f1) && \
alternatives --set javac ${JAVAC_11}
ARG USER_ID=qit
RUN useradd --create-home ${USER_ID}
RUN echo "${USER_ID} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER ${USER_ID}
WORKDIR /home/${USER_ID}
RUN git clone https://github.com/amqp/rhea.git
RUN export JAVA_HOME=$(dirname $(dirname $(alternatives --display javac | grep 'javac' | grep 'link' | awk '{print $NF}'))) && \
git clone https://gitbox.apache.org/repos/asf/qpid-interop-test.git && \
cd qpid-interop-test && \
mkdir build && \
cd build && \
cmake .. && \
make && \
sudo make install