-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from greenbone/y0urself/fix-docker-ci-21.4
[21.04] Fix and integrate the new Dockerimage stucture into 21.04
- Loading branch information
Showing
8 changed files
with
185 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Dockerfile for gvm-libs-$VERSION-$COMPILER-build | ||
|
||
# Define ARG we use through the build | ||
ARG VERSION=master | ||
ARG BUILD_TYPE=Debug | ||
ARG COMPILER=gcc | ||
|
||
FROM greenbone/gvm-libs-$VERSION-$COMPILER-testing | ||
|
||
# This will make apt-get install without question | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Define ARG we use through the build | ||
ARG VERSION | ||
ARG BUILD_TYPE | ||
ARG COMPILER | ||
|
||
COPY . /usr/local/src/gvm-libs | ||
WORKDIR /usr/local/src | ||
|
||
# clone and install gvm-libs | ||
RUN cd gvm-libs && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. && \ | ||
make install |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Dockerfile for gvm-libs-$VERSION-$COMPILER-testing | ||
|
||
# Define ARG we use through the build | ||
ARG VERSION=master | ||
ARG BUILD_TYPE=Debug | ||
ARG COMPILER=gcc | ||
|
||
# Use '-slim' image for reduced image size | ||
FROM debian:buster-slim | ||
|
||
# This will make apt-get install without question | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Redefine ARG we use through the build | ||
ARG VERSION | ||
ARG BUILD_TYPE | ||
ARG COMPILER | ||
|
||
WORKDIR /usr/local/src | ||
|
||
# Install core dependencies required for building and testing gvm-libs | ||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends --assume-yes \ | ||
ca-certificates \ | ||
cmake \ | ||
git \ | ||
libglib2.0-dev \ | ||
libgnutls28-dev \ | ||
libgpgme-dev \ | ||
libhiredis-dev \ | ||
libpcap-dev \ | ||
libssh-gcrypt-dev \ | ||
libxml2-dev \ | ||
libnet1-dev \ | ||
make \ | ||
pkg-config \ | ||
uuid-dev \ | ||
libssl-dev \ | ||
lcov \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install gcc/g++ compiler | ||
RUN if ( test "$COMPILER" = "gcc"); then \ | ||
echo "Compiler is $COMPILER" \ | ||
&& apt-get update \ | ||
&& apt-get install --no-install-recommends --assume-yes gcc g++; \ | ||
fi | ||
|
||
# Install clang compiler | ||
RUN if ( test "$COMPILER" = "clang"); then \ | ||
echo "Compiler is $COMPILER" \ | ||
&& apt-get update \ | ||
&& apt-get install --no-install-recommends --assume-yes \ | ||
clang \ | ||
clang-format \ | ||
clang-tools; \ | ||
fi | ||
|
||
# clone and install mqtt paho | ||
# workaround otherwise paho.mqtt.c creates man1 as a file | ||
RUN if ( test "$VERSION" = "master" || test "$VERSION" = "middleware" ); then \ | ||
echo "Verion is $VERSION" \ | ||
&& mkdir /usr/local/share/man/man1 \ | ||
&& git clone --depth 1 https://github.com/eclipse/paho.mqtt.c \ | ||
&& cd paho.mqtt.c \ | ||
&& make \ | ||
&& make install \ | ||
&& cd .. \ | ||
&& rm -rf paho.mqtt.c; \ | ||
fi | ||
|
||
# & install cgreen for unit tests | ||
RUN git clone --depth 1 https://github.com/cgreen-devs/cgreen.git \ | ||
&& cd cgreen \ | ||
&& make \ | ||
&& make test \ | ||
&& make install \ | ||
&& cd .. \ | ||
&& rm -rf cgreen | ||
|
||
ENV LD_LIBRARY_PATH="/usr/local/lib" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.