alpine:3.14 docker libtls.so.20 conflict - docker

So I am running into an error with the latest docker build from alpine. alpine:3.14.0 was released about a day ago and was trying to install libressl and libressl-dev and both seem to fail with the error below. My work around at the moment was to build using the alpine:3.12.0 as 3.12.0 seems to not have libretls installed. Although I would like to know how to fix this. I tried to remove libretls but that didn't work (error also below). Thanks
$ docker -v
Docker version 20.10.6, build 370c289
$ docker run --rm -it alpine /bin/ash
/ # apk add libressl-dev
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/5) Installing libressl3.3-libcrypto (3.3.3-r0)
(2/5) Installing libressl3.3-libssl (3.3.3-r0)
(3/5) Installing libressl3.3-libtls (3.3.3-r0)
ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20 owned by libretls-3.3.3-r0.
ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20.0.3 owned by libretls-3.3.3-r0.
(4/5) Installing pkgconf (1.7.4-r0)
(5/5) Installing libressl-dev (3.3.3-r0)
Executing busybox-1.33.1-r2.trigger
1 error; 41 MiB in 19 packages
/ #
/ # apk info libretls
libretls-3.3.3-r0 description:
port of libtls from libressl to openssl
libretls-3.3.3-r0 webpage:
https://git.causal.agency/libretls/
libretls-3.3.3-r0 installed size:
84 KiB
/ #
/ # apk del libretls
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: No such file or directory
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: No such file or directory
World updated, but the following packages are not removed due to:
libretls: busybox alpine-baselayout apk-tools
OK: 6 MiB in 14 packages
/ # exit

this is the upstream issue. Downgrading to alpine 3.13 works for now until the issue is fixed.
Normally docker images support fixed alpine versions (thanks to MrGlass comment). For example
python:3-alpine -> python:3-alpine3.13
php:7.4-fpm-alpine -> php:7.4-fpm-alpine3.13

Related

Running geckodriver in an Alpine docker container

I'm trying to run GeckoDriver v0.26.0 inside an Alpine 3.10 docker container, specifically python:3.6.6-alpine3.10.
After figuring some things out, I've hit a wall:
/ # geckodriver --version
Error relocating /usr/bin/geckodriver: __register_atfork: symbol not found
Error relocating /usr/bin/geckodriver: __res_init: symbol not found
What am I missing?
How I got here
First spin up the docker container:
docker run -it python:3.6.9-alpine3.10 /bin/sh
Then try installing GeckoDriver
/ # wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
/ # tar -zxf geckodriver-v0.26.0-linux64.tar.gz -C /usr/bin
/ # geckodriver --version
/bin/sh: geckodriver: not found.
Really? but I just extracted it... Hmm... OK. Did it extract correctly? Is $PATH correct?
/ # ls -lah /usr/bin/geckodriver
-rwxr-xr-x 1 1000 1000 6.7M Oct 12 10:19 /usr/bin/geckodriver
/ # echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Yes. OK, Let's google things. Well perhaps I should check the file info. Alpine doesn't have that by default.
/ # apk add file
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/2) Installing libmagic (5.37-r1)
(2/2) Installing file (5.37-r1)
Executing busybox-1.30.1-r2.trigger
OK: 24 MiB in 36 packages
/ # file /usr/bin/geckodriver
/usr/bin/geckodriver: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=32c4cfc2d9346336dc7c20e99a62df9be344d609, with debug_info, not stripped
The answer to that same question says to check for /lib64/ld-linux-x86-64.so.2:
/ # ls /lib64
ls: /lib64: No such file or directory
Missing. OK, how do we get that? The Alpine package repo says it's part of libc6-compat. Cool install that and things will work... right?
/ # apk add libc6-compat
(1/1) Installing libc6-compat (1.1.22-r3)
OK: 24 MiB in 37 packages
/ # ls /lib64
ld-linux-x86-64.so.2
/ # geckodriver --version
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /usr/bin/geckodriver)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/bin/geckodriver)
Error relocating /usr/bin/geckodriver: __register_atfork: symbol not found
Error relocating /usr/bin/geckodriver: _Unwind_Resume: symbol not found
Error relocating /usr/bin/geckodriver: __res_init: symbol not found
Error relocating /usr/bin/geckodriver: _Unwind_GetIP: symbol not found
Error relocating /usr/bin/geckodriver: _Unwind_Backtrace: symbol not found
... Well at least it recognizes it as an executable file now... OK, so we need libgcc_s.so.1. That's in libgcc. Makes sense.
/ # apk add libgcc
(1/1) Installing libgcc (8.3.0-r0)
OK: 24 MiB in 38 packages
/ # geckodriver --version
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/bin/geckodriver)
Error relocating /usr/bin/geckodriver: __register_atfork: symbol not found
Error relocating /usr/bin/geckodriver: __res_init: symbol not found
What? We have ld-linux-x86-64.so.2 in /lib64, where's it looking? I did notice that the gcompat package as /lib/ld-linux-x86-64.so.2, maybe it's looking there?
# / apk add gcompat
(1/2) Installing libucontext (0.1.3-r1)
(2/2) Installing gcompat (0.4.0-r0)
OK: 24 MiB in 40 packages
# / geckodriver --version
Error relocating /usr/bin/geckodriver: __register_atfork: symbol not found
Error relocating /usr/bin/geckodriver: __res_init: symbol not found
And that's where I'm at. Googling for __register_atfork and __res_init don't return anything useful.
So the root cause of the issue appears to be that Alpine uses musl libc and GeckoDriver (indirectly) uses glibc.
SGerrand has a great glibc compatibility layer package for Alpine Linux which we'll make use of.
To get GeckoDriver running on Alpine:
# Get all the prereqs
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-bin-2.30-r0.apk
apk add glibc-2.30-r0.apk
apk add glibc-bin-2.30-r0.apk
# And of course we need Firefox if we actually want to *use* GeckoDriver
apk add firefox-esr=60.9.0-r0
# Then install GeckoDriver
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
tar -zxf geckodriver-v0.26.0-linux64.tar.gz -C /usr/bin
geckodriver --version
Caveats:
Only tested on the python:3.6.9-alpine3.10 docker image.
Alpine 3.10 only has Firefox ESR 60. Luckily GeckoDriver v0.26 has a minimum version of FireFox 60.
The Alpine Edge branch has Firefox-ESR 86 and Firefox 70.

Building image in minikube got stuck

I'm trying to deploy local image in minikube.
This is what I'm doing:
minikube start
eval $(minikube docker-env)
Trying to build image in minikube (build image -t my-image .), but it gets stuck at 2. fetching packages... line
I don't have any HTTP_PROXY, HTTPS_PROXY, NO_PROXY set. Anybody had such an issue?
Edit. This is my Dockerfile. It works fine. I can build, push, pull from remote docker registry. It only doesn't work, when I build image in minikube.
FROM node:10.16.2-alpine
WORKDIR /app/server
ADD package.json .
RUN apk --no-cache add --virtual .build build-base python && \
yarn install && \
npm rebuild bcrypt --build-from-source && \
yarn cache clean && \
apk del .build
ADD . .
EXPOSE 3000
CMD [ "yarn", "start" ]
This is docker build log in minikube:
Sending build context to Docker daemon 292MB
Step 1/7 : FROM node:10.16.2-alpine
---> 4f877c96a193
Step 2/7 : WORKDIR /app/server
---> Using cache
---> 71cd2676c364
Step 3/7 : ADD package.json .
---> Using cache
---> af5f79d46abf
Step 4/7 : RUN apk --no-cache add --virtual .build build-base python && yarn install && npm rebuild bcrypt --build-from-source && yarn cache clean && apk del .build
---> Running in c38695ed65b7
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/27) Installing binutils (2.31.1-r2)
(2/27) Installing libmagic (5.36-r0)
(3/27) Installing file (5.36-r0)
(4/27) Installing gmp (6.1.2-r1)
(5/27) Installing isl (0.18-r0)
(6/27) Installing libgomp (8.3.0-r0)
(7/27) Installing libatomic (8.3.0-r0)
(8/27) Installing mpfr3 (3.1.5-r1)
(9/27) Installing mpc1 (1.0.3-r1)
(10/27) Installing gcc (8.3.0-r0)
(11/27) Installing musl-dev (1.1.20-r5)
(12/27) Installing libc-dev (0.7.1-r0)
(13/27) Installing g++ (8.3.0-r0)
(14/27) Installing make (4.2.1-r2)
(15/27) Installing fortify-headers (1.0-r0)
(16/27) Installing build-base (0.5-r1)
(17/27) Installing libbz2 (1.0.6-r7)
(18/27) Installing expat (2.2.7-r0)
(19/27) Installing libffi (3.2.1-r6)
(20/27) Installing gdbm (1.13-r1)
(21/27) Installing ncurses-terminfo-base (6.1_p20190105-r0)
(22/27) Installing ncurses-terminfo (6.1_p20190105-r0)
(23/27) Installing ncurses-libs (6.1_p20190105-r0)
(24/27) Installing readline (7.0.003-r1)
(25/27) Installing sqlite-libs (3.28.0-r0)
(26/27) Installing python2 (2.7.16-r1)
(27/27) Installing .build (0)
Executing busybox-1.29.3-r10.trigger
OK: 211 MiB in 43 packages
yarn install v1.17.3
info No lockfile found.
[1/4] Resolving packages...
warning bugsnag#2.4.3: All projects should upgrade to our universal JS notifier: "#bugsnag/js". See https://github.com/bugsnag/bugsnag-js/blob/master/UPGRADING.md for more details.
warning bugsnag > cuid > core-js#1.2.7: core-js#<2.6.8 is no longer maintained. Please, upgrade to core-js#3 or at least to actual version of core-js#2.
warning node-mailer#0.1.1: node-mailer is not maintained
warning jest > jest-cli > prompts > kleur#2.0.2: Please upgrade to kleur#3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
warning jest > jest-cli > jest-environment-jsdom > jsdom > left-pad#1.3.0: use String.prototype.padStart()
warning nest-cli > exists-sync#0.0.3: Please replace with usage of fs.existsSync
warning supertest > superagent#3.8.3: Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header). This notice will go away with v5.0.2+ once it is released.
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
You can try to increase --network timeout parameter, adapting it in yarn command line within the shared Dockerfile as #Marc ABOUCHACRA mentioned in the comment:
yarn install --network-timeout 1000000
The issue seems to be very common and not related to minikube VM, just search for the details in this Stack thread.

How to install SSHFS inside Alpine container?

I use php:7.3.2-cli-alpine3.9 as my base image. I also need SSHFS installed inside container since PHP library I use relies on it. I know there are many answers with "if you install SSHFS inside container you are doing it wrong" but in my case I need this software installed inside container not on host.
In my Dockerfile I have
RUN apk update && apk add sshfs;
This command is executed without errors:
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
v3.9.3-21-g265a28802e [http://dl-cdn.alpinelinux.org/alpine/v3.9/main]
v3.9.3-15-g583c0d55e9 [http://dl-cdn.alpinelinux.org/alpine/v3.9/community]
OK: 9764 distinct packages available
(1/12) Installing openssh-keygen (7.9_p1-r4)
(2/12) Installing openssh-client (7.9_p1-r4)
(3/12) Installing fuse-common (3.2.6-r1)
(4/12) Installing fuse3 (3.2.6-r1)
(5/12) Installing libffi (3.2.1-r6)
(6/12) Installing libintl (0.19.8.1-r4)
(7/12) Installing libuuid (2.33-r0)
(8/12) Installing libblkid (2.33-r0)
(9/12) Installing libmount (2.33-r0)
(10/12) Installing pcre (8.42-r1)
(11/12) Installing glib (2.58.1-r2)
(12/12) Installing sshfs (3.5.1-r0)
Executing busybox-1.29.3-r10.trigger
Executing glib-2.58.1-r2.trigger
OK: 25 MiB in 44 packages
But when I am trying to mount remote host
'/usr/bin/sshfs' -C -o reconnect -o 'Port=22' -o 'UserKnownHostsFile=/ssh/known_hosts' -o StrictHostKeyChecking=yes -o 'IdentityFile=/ssh/<FILE>' -o PasswordAuthentication=no '<USER>#<HOST>:/' '/fuse/'
I am getting:
fuse: device not found, try 'modprobe fuse' first
When I am running it I am getting:
modprobe: can't change directory to '/lib/modules': No such file or directory
Am I missing any packages? What else needs to be installed?
Thanks.
In order to run SSHFS inside container it requires privileged permissions.
Install SSHFS by adding this line in Dockerfile:
RUN apk update && apk add sshfs;
Run container:
docker run --privileged=true -it --rm --name alpine-app transfers-image

docker on centos that has no internet, rpm package dependency issue

I am facing an issue installing docker-ce from package on a server that has no internet access.
This is the version of my Linux | centos-release-7-2.1511.el7.centos.2.10.x86_64
Virtualization: vmware
Operating system: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-327.el7.x86_64
Architecture: x86-64
Im trying to follow the instructions as set here however since the box doesnt have internet I can't do the yum install.
So I was doing it with rpm -ivh. So far im getting dependency errors after dependency errors.
I tried these 3 versions of docker and all of them are giving out a dependency errors.
-rw-r--r--. 1 root root 19521288 Nov 8 00:52 docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm
-rw-r--r--. 1 root root 19529520 Nov 8 00:02 docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
-rw-r--r--. 1 root root 29108 Nov 8 00:53 docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch.rpm
-rw-r--r--. 1 root root 29108 Nov 8 00:03 docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
-rw-r--r--. 1 root root 19509116 Nov 8 01:26 docker-engine-1.13.1-1.el7.centos.x86_64.rpm
-rw-r--r--. 1 root root 29024 Nov 8 01:26 docker-engine-selinux-1.13.1-1.el7.centos.noarch.rpm
rpm -ivh /docker/images/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
warning: /docker/images/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
error: Failed dependencies:
docker-ce-selinux >= 17.03.2.ce-1.el7.centos is needed by docker-ce-17.03.2.ce-1.el7.centos.x86_64
rpm -ivh /docker/images/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
warning: /docker/images/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
error: Failed dependencies:
selinux-policy-base >= 3.13.1-102 is needed by docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch
selinux-policy-targeted >= 3.13.1-102 is needed by docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch
So I tried looking for that selinux package the I found on the site below:
I tried installing the rpm from rpmfindand unfortunately, its asking for another dependency.
rpm -ivh selinux-policy-minimum-3.13.1-102.el7.noarch.rpm
warning: selinux-policy-minimum-3.13.1-102.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
policycoreutils-python >= 2.5 is needed by selinux-policy-minimum-3.13.1-102.el7.noarch
selinux-policy = 3.13.1-102.el7 is needed by selinux-policy-minimum-3.13.1-102.el7.noarch
rpm -ivh selinux-policy-targeted-3.13.1-102.el7.noarch.rpm
warning: selinux-policy-targeted-3.13.1-102.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
policycoreutils >= 2.5 is needed by selinux-policy-targeted-3.13.1-102.el7.noarch
selinux-policy = 3.13.1-102.el7 is needed by selinux-policy-targeted-3.13.1-102.el7.noarch
Has anyone tried installing docker on this version of centos before that has no access to the internet?
Do you have any easier way of getting through this?
Thank you in advance!
On a machine with internet, download all dependencies:
mkdir -p offline_repo && cd offline_repo
curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
yum install --downloadonly --downloaddir=. docker-ce-*.rpm
You can do it on any machine (any OS) that have docker installed and internet access, you can download the dependencies within a container:
mkdir offline_repo
docker run --rm -it -v $PWD/offline_repo:/offline_repo centos:7.2.1511 \
sh -c 'cd /offline_repo \
&& curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm \
&& curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm \
&& yum install --downloadonly --downloaddir=. docker-ce-*.rpm'
Now you should have all required packages available in the offline_repo dir, which should look like this:
$ ls -1 offline_repo/
audit-libs-2.6.5-3.el7_3.1.x86_64.rpm
audit-libs-python-2.6.5-3.el7_3.1.x86_64.rpm
checkpolicy-2.5-4.el7.x86_64.rpm
docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
iptables-1.4.21-17.el7.x86_64.rpm
libcgroup-0.41-11.el7.x86_64.rpm
libmnl-1.0.3-7.el7.x86_64.rpm
libnetfilter_conntrack-1.0.6-1.el7_3.x86_64.rpm
libnfnetlink-1.0.1-4.el7.x86_64.rpm
libseccomp-2.3.1-2.el7.x86_64.rpm
libselinux-2.5-6.el7.x86_64.rpm
libselinux-python-2.5-6.el7.x86_64.rpm
libselinux-utils-2.5-6.el7.x86_64.rpm
libsemanage-2.5-5.1.el7_3.x86_64.rpm
libsemanage-python-2.5-5.1.el7_3.x86_64.rpm
libsepol-2.5-6.el7.x86_64.rpm
libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
policycoreutils-2.5-11.el7_3.x86_64.rpm
policycoreutils-python-2.5-11.el7_3.x86_64.rpm
python-IPy-0.75-6.el7.noarch.rpm
selinux-policy-3.13.1-102.el7_3.16.noarch.rpm
selinux-policy-minimum-3.13.1-102.el7_3.16.noarch.rpm
selinux-policy-targeted-3.13.1-102.el7_3.16.noarch.rpm
setools-libs-3.3.8-1.1.el7.x86_64.rpm
systemd-219-30.el7_3.9.x86_64.rpm
systemd-libs-219-30.el7_3.9.x86_64.rpm
Then simply copy it to the offline machine, then install all packages:
cd offline_repo
yum install -y --cacheonly --disablerepo=* *.rpm

How to solve `Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o` while compiling qpid-cpp within Docker Alpine?

Qpid-cpp has been compiled in a Ubuntu docker image and the current size is 1.86GB:
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-qpid-cpp latest 7e60a5eabee1 44 hours ago 1.86 GB
Aim
To compile qpid-cpp within docker alpine to reduce the disk size of the image
Problem
Some packages that are available in Ubuntu are omitted or different in Alpine, e.g.:
ubuntu
RUN apt-get update -y && \
apt-get install -y wget && \
apt-get install -y build-essential python ruby && \
apt-get install -y cmake libblkid-dev e2fslibs-dev libboost-all-dev libaudit-dev
Attempt
In order to find the substitution packages the Dockerfile was built and when an error occurred the required package that is available in Alpine was added.
alpine
RUN apk update && \
apk add wget python ruby cmake build-base boost-dev util-linux-dev
Although most errors were solved, the following issue occurs while compile qpid-cpp within alpine:
[ 17%] Building CXX object
src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o
In file included from
/qpid-cpp/bld/qpid-cpp-1.36.0/src/qpid/sys/posix/Condition.h:31:0,
from /qpid-cpp/bld/qpid-cpp-1.36.0/src/qpid/sys/posix/Condition.cpp:22:
/usr/include/sys/errno.h:1:2: error: #warning redirecting incorrect
#include <sys/errno.h> to <errno.h> [-Werror=cpp]
#warning redirecting incorrect #include <sys/errno.h> to <errno.h>
^~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/qpidcommon.dir/build.make:2727:
src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1494: src/CMakeFiles/qpidcommon.dir/all]
Error 2 make: *** [Makefile:161: all] Error 2
The command '/bin/sh -c cd qpid-cpp/bld/qpid-cpp-1.36.0 && make all && make
install' returned a non-zero code: 2
Question
How to solve the compilation issue Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o while compiling qpid-cpp within Docker Alpine?
I tried this with Ubuntu and Alpine docker images, and I get the same problem on Alpine. It appears that qpid won't build on Alpine Linux.
Be aware that the Ubuntu:16.04 image is 130 MB, 750 MB with dependencies installed. Compared to Alpine's 5 MB, and 476 MB with dependencies.
So those 1.86 GB are mostly made up of build dependencies and qpid itself. You won't be able to escape that with any other image. Maybe you could purge some of the build dependencies after building to decrease the final size.

Resources