Verified Commit 1e9045a2 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Refactor Docker images

parent 1d80ede0
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
FROM debian:stable-slim

LABEL Description="This is a debian based environment to build GekkoFS"

ENV GKFS_PATH	/opt/gkfs

ENV SCRIPTS_PATH	${GKFS_PATH}/scripts
ENV DEPS_SRC_PATH	${GKFS_PATH}/deps_src
ENV INSTALL_PATH	${GKFS_PATH}/build_deps
LABEL Description="Debian-based environment suitable to build GekkoFS and its dependencies"

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
@@ -25,7 +19,7 @@ RUN apt-get update && \
		# Mercury dependencies
		libltdl-dev \
		lbzip2 \
		# RocksDB
		# RocksDB dependencies
		libsnappy-dev \
		liblz4-dev \
		libzstd-dev \
@@ -33,41 +27,11 @@ RUN apt-get update && \
		zlib1g-dev \
		# syscall_intercept dependencies
		libcapstone-dev \
		# GekkoFS
		# GekkoFS dependencies
		libboost-filesystem-dev \
		libboost-program-options-dev \
		valgrind \
		uuid-dev \
		python3 \
		python3-pip \
		python3-dev \
		python3-venv \
		python3-setuptools \
		expect \
		# clang 10 deps
		lsb-release \
		wget \
		software-properties-common \
		gnupg2 \
    # add clang-10 repos
    wget https://apt.llvm.org/llvm.sh -P /tmp && chmod +x /tmp/llvm.sh && /tmp/llvm.sh 10 && \
    # install clang-format
    apt-get update && apt-get install -y --no-install-recommends clang-format-10 && \
    # install gcovr
    # (required for partial coverage reports in parallel runs)
    python3 -m pip install --upgrade pip && \
    pip3 install gcovr && \
		uuid-dev && \
    # Clean apt cache to reduce image layer size
    rm -rf /var/lib/apt/lists/* && rm /tmp/llvm.sh && \
    rm -rf /var/lib/apt/lists/* && \
    # Clean apt caches of packages
    apt-get clean && apt-get autoclean

## COPY scripts/dl_dep.sh		$SCRIPTS_PATH/
## COPY scripts/compile_dep.sh $SCRIPTS_PATH/
## COPY scripts/patches        $SCRIPTS_PATH/patches
## 
## # Download dependencies source
## RUN /bin/bash $SCRIPTS_PATH/dl_dep.sh $DEPS_SRC_PATH all
## 
## # Compile dependencies
## RUN /bin/bash $SCRIPTS_PATH/compile_dep.sh $DEPS_SRC_PATH $INSTALL_PATH
+4 −0
Original line number Diff line number Diff line
.PHONY: all

all:
	docker build -t gekkofs/core:0.8.0 .
+20 −0
Original line number Diff line number Diff line
FROM debian:stable-slim

LABEL Description="Environment to generate coverage reports in GekkoFS"

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        wget \
        git \
        cmake \
        gcc \
        g++ \
        lcov \
        python3 \
        python3-pip \
        python3-setuptools && \
    rm -rf /var/lib/apt/lists/* && \
    apt-get clean && \
    apt-get autoclean && \
    python3 -m pip install --upgrade pip && \
    pip3 install gcovr
+4 −0
Original line number Diff line number Diff line
.PHONY: all

all:
	docker build -t gekkofs/coverage:0.8.0 .
+35 −0
Original line number Diff line number Diff line
FROM gekkofs/core:0.8.0

LABEL Description="Debian-based environment to build GekkoFS"

ENV GKFS_PATH	/opt/gkfs
ENV GKFS_VERSION 0.8.0

ENV SCRIPTS_PATH	${GKFS_PATH}/scripts
ENV DEPS_SRC_PATH	${GKFS_PATH}/deps_src
ENV INSTALL_PATH	/usr/local

COPY scripts/dl_dep.sh		${SCRIPTS_PATH}/
COPY scripts/compile_dep.sh ${SCRIPTS_PATH}/
COPY scripts/patches        ${SCRIPTS_PATH}/patches
COPY scripts/profiles       ${SCRIPTS_PATH}/profiles

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
		python3 \
		python3-pip \
		python3-dev \
		python3-venv \
		python3-setuptools && \
    python3 -m pip install --upgrade pip && \
    rm -rf /var/lib/apt/lists/* && \
    apt-get clean && apt-get autoclean
 
# Download and build dependencies
RUN cd ${SCRIPTS_PATH} && \
    /bin/bash ./dl_dep.sh -p ci:${GKFS_VERSION} ${DEPS_SRC_PATH} && \
    /bin/bash ./compile_dep.sh -j 8 -p ci:${GKFS_VERSION} ${DEPS_SRC_PATH} ${INSTALL_PATH} && \
    rm -rf ${DEPS_SRC_PATH} && \
    rm -rf ${SCRIPTS_PATH} && \
    rmdir ${GKFS_PATH} && \
    ldconfig
Loading