1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00

replaces amd64-debian with amd64-alpine image

This commit is contained in:
Falk Werner 2019-05-25 01:57:04 +02:00
parent 07e32757f8
commit 9c7fe85312
3 changed files with 45 additions and 36 deletions

View File

@ -22,24 +22,24 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(C_WARNINGS -Wall -Wextra) set(C_WARNINGS -Wall -Wextra)
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") #if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
#
#add_definitions(
# -pg
# --coverage
# -fprofile-arcs
# -ftest-coverage
#)
add_definitions( #if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
-pg # link_libraries(gcov)
--coverage #else()
-fprofile-arcs # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
-ftest-coverage #endif()
)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU") #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -fprofile-arcs")
link_libraries(gcov)
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs") #endif()
endif()
include_directories( include_directories(
"include" "include"

View File

@ -37,6 +37,7 @@ CONTAINER_GROUP ?= user
UBUNTU_CODENAME ?= bionic UBUNTU_CODENAME ?= bionic
DEBIAN_CODENAME ?= testing-slim DEBIAN_CODENAME ?= testing-slim
ALPINE_CODENAME ?= 3.9
SKIP_MD5SUM ?= $(call filter_out_command,md5sum) SKIP_MD5SUM ?= $(call filter_out_command,md5sum)
SKIP_MD5SUM := $(SKIP_MD5SUM) SKIP_MD5SUM := $(SKIP_MD5SUM)
@ -84,7 +85,7 @@ $(SKIP_MD5SUM)$(FETCHDIR)/qemu-arm-static-$(QEMU_VERSION): MD5 := 8ebd24e63fdfa0
# Architecture-specific rule target configuration # Architecture-specific rule target configuration
CMAKE_TARGETS += amd64-ubuntu-builder CMAKE_TARGETS += amd64-ubuntu-builder
CMAKE_TARGETS += amd64-debian-builder CMAKE_TARGETS += amd64-alpine-builder
CMAKE_TARGETS += arm32v7-ubuntu-builder CMAKE_TARGETS += arm32v7-ubuntu-builder
CMAKE_TARGETS += arm32v7-debian-builder CMAKE_TARGETS += arm32v7-debian-builder
@ -96,6 +97,9 @@ UBUNTU_TARGETS = $(addprefix $(OUTDIR)/docker/,$(call filter_targets,$(UBUNTU_FI
DEBIAN_FILTER = $(call regex_march_distro,'.*','debian') DEBIAN_FILTER = $(call regex_march_distro,'.*','debian')
DEBIAN_TARGETS = $(addprefix $(OUTDIR)/docker/,$(call filter_targets,$(DEBIAN_FILTER),$(TARGETS))) DEBIAN_TARGETS = $(addprefix $(OUTDIR)/docker/,$(call filter_targets,$(DEBIAN_FILTER),$(TARGETS)))
ALPINE_FILTER = $(call regex_march_distro,'.*','alpine')
ALPINE_TARGETS = $(addprefix $(OUTDIR)/docker/,$(call filter_targets,$(ALPINE_FILTER),$(TARGETS)))
####################################################################################################################### #######################################################################################################################
# Common rule target configuration # Common rule target configuration
@ -140,6 +144,8 @@ $(UBUNTU_TARGETS): CODENAME := $(UBUNTU_CODENAME)
$(DEBIAN_TARGETS): CODENAME := $(DEBIAN_CODENAME) $(DEBIAN_TARGETS): CODENAME := $(DEBIAN_CODENAME)
$(ALPINE_TARGETS): CODENAME := $(ALPINE_CODENAME)
$(FETCH_TARGETS): | $(FETCHDIR) $(FETCH_TARGETS): | $(FETCHDIR)
$(SILENT)$(call curl,$@,$(URL),$(MD5)) $(SILENT)$(call curl,$@,$(URL),$(MD5))

View File

@ -1,20 +1,23 @@
ARG REGISTRY_PREFIX='' ARG REGISTRY_PREFIX=''
ARG CODENAME=testing-slim ARG CODENAME=3.9
FROM ${REGISTRY_PREFIX}debian:${CODENAME} as builder FROM ${REGISTRY_PREFIX}alpine:${CODENAME} as builder
RUN set -x \ RUN set -x \
&& apt update \ && apk add --no-cache \
&& apt upgrade -y \ bash \
&& apt install --yes --no-install-recommends \ coreutils \
build-essential \ gcc \
g++ \
make \
cmake \ cmake \
ninja-build \ ninja \
pkg-config \ pkgconf \
rsync \ rsync \
gdb \ gdb \
gdbserver \ valgrind \
valgrind util-linux \
util-linux-dev
COPY src /usr/local/src COPY src /usr/local/src
@ -23,8 +26,8 @@ ARG PARALLELMFLAGS=-j2
ARG DUMB_INIT_VERSION=1.2.2 ARG DUMB_INIT_VERSION=1.2.2
RUN set -x \ RUN set -x \
&& builddeps="xxd" \ && builddeps="vim" \
&& apt install --yes --no-install-recommends $builddeps \ && apk add --no-cache --virtual .build-deps $builddeps \
&& builddir="/tmp/out" \ && builddir="/tmp/out" \
&& mkdir -p "$builddir" \ && mkdir -p "$builddir" \
&& cd "$builddir" \ && cd "$builddir" \
@ -35,7 +38,7 @@ RUN set -x \
&& mv dumb-init /usr/local/bin/dumb-init \ && mv dumb-init /usr/local/bin/dumb-init \
&& dumb-init --version \ && dumb-init --version \
&& rm -rf "$builddir" \ && rm -rf "$builddir" \
&& apt purge -y $builddeps && apk del .build-deps
ARG GTEST_VERSION=1.8.1 ARG GTEST_VERSION=1.8.1
@ -50,8 +53,8 @@ RUN set -x \
ARG FUSE_VERSION=3.1.1 ARG FUSE_VERSION=3.1.1
RUN set -x \ RUN set -x \
&& builddeps="libtool automake gettext" \ && builddeps="libtool automake autoconf gettext-dev m4 linux-headers" \
&& apt install --yes --no-install-recommends $builddeps \ && apk add --no-cache --virtual .build-deps $builddeps \
&& cd "/usr/local/src/libfuse-fuse-$FUSE_VERSION" \ && cd "/usr/local/src/libfuse-fuse-$FUSE_VERSION" \
&& ./makeconf.sh \ && ./makeconf.sh \
&& builddir="/tmp/out" \ && builddir="/tmp/out" \
@ -60,15 +63,15 @@ RUN set -x \
&& "/usr/local/src/libfuse-fuse-$FUSE_VERSION/configure" \ && "/usr/local/src/libfuse-fuse-$FUSE_VERSION/configure" \
&& make "$PARALLELMFLAGS" install \ && make "$PARALLELMFLAGS" install \
&& rm -rf "$builddir" \ && rm -rf "$builddir" \
&& apt purge -y $builddeps && apk del .build-deps
ARG WEBSOCKETS_VERSION=3.1.0 ARG WEBSOCKETS_VERSION=3.1.0
RUN set -x \ RUN set -x \
&& apt install --yes --no-install-recommends \ && apk add --no-cache \
ca-certificates \ ca-certificates \
openssl \ openssl \
libssl-dev \ openssl-dev \
&& builddir="/tmp/out" \ && builddir="/tmp/out" \
&& mkdir -p "$builddir" \ && mkdir -p "$builddir" \
&& cd "$builddir" \ && cd "$builddir" \
@ -87,6 +90,7 @@ RUN set -x \
&& rm -rf "$builddir" && rm -rf "$builddir"
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
ARG USERID=1000 ARG USERID=1000
@ -95,7 +99,7 @@ ARG OUTDIR=/workspace/out
ARG SCRIPTDIR=/workspace/bin ARG SCRIPTDIR=/workspace/bin
RUN set -x \ RUN set -x \
&& useradd -u "$USERID" -ms /bin/bash user \ && adduser -u "$USERID" -s /bin/bash -D user \
&& mkdir -p "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR" \ && mkdir -p "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR" \
&& chown user:user "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR" && chown user:user "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR"
@ -105,4 +109,3 @@ ENTRYPOINT ["dumb-init", "--"]
# unused # unused
ARG QEMU_VERSION_=v3.1.0-2 ARG QEMU_VERSION_=v3.1.0-2