Commit ab8861a7 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼

docker: skip comedilib in Alpine images as Alpine's musl ld has broken

support for symbol versioning
parent 704b31e0
......@@ -307,22 +307,32 @@ packaging:docker:amd64:
variables:
PLATFORM: linux/amd64
DOCKER_TAG: ${CI_COMMIT_REF_NAME}-amd64
DOCKER_OPTS: --build-arg ARCH=amd64
--build-arg TRIPLET=x86_64-alpine-linux-musl
packaging:docker:arm64:
<<: *packaging_docker
variables:
PLATFORM: linux/arm64
PLATFORM: linux/arm64/v8
DOCKER_TAG: ${CI_COMMIT_REF_NAME}-arm64
DOCKER_OPTS: --build-arg ARCH=arm64
--build-arg TRIPLET=aarch64-linux-gnu
--build-arg TRIPLET=aarch64-alpine-linux-musl
packaging:docker:armv6:
<<: *packaging_docker
variables:
PLATFORM: linux/arm/v6
DOCKER_TAG: ${CI_COMMIT_REF_NAME}-armv6
DOCKER_OPTS: --build-arg ARCH=armv6
--build-arg TRIPLET=armv6-alpine-linux-musleabihf
packaging:docker:armv7:
<<: *packaging_docker
variables:
PLATFORM: linux/arm/v7
DOCKER_TAG: ${CI_COMMIT_REF_NAME}-armv7
DOCKER_OPTS: --build-arg ARCH=armhf
--build-arg TRIPLET=arm-linux-gnueabihf
DOCKER_OPTS: --build-arg ARCH=armv7
--build-arg TRIPLET=armv7-alpine-linux-musleabihf
# Stage: deploy
##############################################################################
......@@ -380,6 +390,7 @@ deploy:docker:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
needs:
- packaging:docker:amd64
- packaging:docker:armv6
- packaging:docker:armv7
- packaging:docker:arm64
script:
......@@ -390,6 +401,7 @@ deploy:docker:
- docker manifest create ${DOCKER_IMAGE}:${DOCKER_TAG}
${DOCKER_IMAGE}:${DOCKER_TAG}-amd64
${DOCKER_IMAGE}:${DOCKER_TAG}-arm64
${DOCKER_IMAGE}:${DOCKER_TAG}-armv6
${DOCKER_IMAGE}:${DOCKER_TAG}-armv7
- docker manifest push ${DOCKER_IMAGE}:${DOCKER_TAG}
tags:
......
......@@ -28,13 +28,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###################################################################################
ARG GIT_REV=unknown
ARG GIT_BRANCH=unknown
ARG VERSION=unknown
ARG DISTRO=unknown
FROM alpine:edge AS dev
ARG DISTRO=alpine
ARG ARCH=x86_64
ARG TRIPLET=x86_64-alpine-linux-musl
# Toolchain
RUN apk update && \
apk add gcc g++ \
......@@ -62,14 +61,14 @@ RUN apk update && \
protobuf-dev \
protobuf-c-dev \
zeromq-dev \
nanomsg-dev@testing \
rabbitmq-c-dev \
mosquitto-dev \
libusb-dev
ENV DISTRO=alpine
ENV ARCH=x86_64
ENV TRIPLET=x86_64-linux-gnu
RUN if [ "${ARCH}" != "armv6" -a "${ARCH}" != "armv7" ]; then \
apk add \
nanomsg-dev@testing; \
fi
# Some fixes for Alpine
RUN echo -e "#!/bin/sh\n" | \
......@@ -78,19 +77,24 @@ RUN echo -e "#!/bin/sh\n" | \
chmod +x /usr/bin/udevadm /bin/ldconfig && \
mv /sbin/ldconfig /sbin/ldconfig.orig
# Disabling a few dependencies due to incompatability with musl-libc:
# https://github.com/creytiv/re/issues/256
# https://github.com/mz-automation/libiec61850/issues/279
ENV SKIP_CRITERION=1
ENV SKIP_ETHERLAB=1
ENV SKIP_LIBRE=1
ENV PREFIX=/app
RUN mkdir /app
# Install unpackaged dependencies from source
ADD packaging/deps.sh /
RUN bash deps.sh && \
# Disabling a few dependencies due to incompatability with musl-libc:
# https://github.com/creytiv/re/issues/256
# https://github.com/mz-automation/libiec61850/issues/279
RUN export SKIP_CRITERION=1; \
export SKIP_ETHERLAB=1; \
export SKIP_LIBRE=1; \
if [ "${ARCH}" == "armv6" -o "${ARCH}" == "armv7" ]; then \
export SKIP_COMEDILIB=1; \
export SKIP_ULDAQ=1; \
fi; \
bash deps.sh && \
ldconfig.orig /usr/local/lib /usr/lib
FROM dev AS builder
......@@ -105,6 +109,10 @@ RUN cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
FROM alpine:edge AS app
ARG DISTRO=alpine
ARG ARCH=x86_64
ARG TRIPLET=x86_64-alpine-linux-musl
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add \
......@@ -120,11 +128,15 @@ RUN apk add \
protobuf \
protobuf-c \
zeromq \
nanomsg@testing \
rabbitmq-c \
mosquitto \
libusb
RUN if [ "${ARCH}" != "armv6" -a "${ARCH}" != "armv7" ]; then \
apk add \
nanomsg@testing; \
fi
COPY --from=builder /app /app
RUN ldconfig /app/lib /app/lib64
......@@ -134,6 +146,10 @@ ENV PATH=/app/bin:${PATH}
# Test if it runs
RUN villas node -h 2&>1 > /dev/null
ARG GIT_REV=unknown
ARG GIT_BRANCH=unknown
ARG VERSION=unknown
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.name="VILLASnode" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment