Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

D-Bus error when building from Dockerfile #16

Closed
oliv3 opened this issue Apr 7, 2019 · 4 comments
Closed

D-Bus error when building from Dockerfile #16

oliv3 opened this issue Apr 7, 2019 · 4 comments

Comments

@oliv3
Copy link

oliv3 commented Apr 7, 2019

Hi, first thanks for this useful image ! It's been running out of the box using the Docker image.
Now, I want to integrate this to my docker-compose.yml, here is the relevant part:

  ipsec-vpn-server:
    container_name: ipsec-vpn-server
    build: docker-ipsec-vpn-server/docker

When I run docker-compose up --build, the build fails/ends like this:

(...)
Install: ./tncfg -> /usr/local/libexec/ipsec/tncfg
ipsec_tncfg.5 -> /usr/local/man/man5
ipsec_tncfg.8 -> /usr/local/man/man8
Install: ./_updown.netkey -> /usr/local/libexec/ipsec/_updown.netkey
ipsec__updown.netkey.8 -> /usr/local/man/man8
Failed to get D-Bus connection: Unknown error -1
../../../initsystems/systemd/Makefile:23: recipe for target 'installsystemdservice' failed
make[2]: *** [installsystemdservice] Error 1
make[1]: *** [local-install-base] Error 2
Makefile:23: recipe for target 'local-install-base' failed
mk/targets.mk:88: recipe for target 'recursive-install' failed
make: *** [recursive-install] Error 2
ERROR: Service 'ipsec-vpn-server' failed to build: The command '/bin/sh -c sed -i "s/httpredir\.debian\.org/ftp.us.debian.org/g" /etc/apt/sources.list     && apt-get -yqq update     && DEBIAN_FRONTEND=noninteractive apt-get -yqq --no-install-recommends install          wget dnsutils openssl ca-certificates kmod          iproute gawk grep sed net-tools iptables          bsdmainutils libunbound2 libcurl3-nss          libnss3-tools libevent-dev libcap-ng0 xl2tpd          libnss3-dev libnspr4-dev pkg-config libpam0g-dev libldns-dev          libcap-ng-dev libcap-ng-utils libselinux1-dev          libcurl4-nss-dev libsystemd-dev flex bison gcc make          libunbound-dev xmlto     && wget -t 3 -T 30 -nv -O "libreswan.tar.gz" "https://download.libreswan.org/libreswan-${SWAN_VER}.tar.gz"     || wget -t 3 -T 30 -nv -O "libreswan.tar.gz" "https://github.com/libreswan/libreswan/archive/v${SWAN_VER}.tar.gz"     && tar xzf "libreswan.tar.gz"     && rm -f "libreswan.tar.gz"     && cd "libreswan-${SWAN_VER}"     && echo "WERROR_CFLAGS =" > Makefile.inc.local     && make -s programs     && make -s install     && cd /opt/src     && rm -rf "/opt/src/libreswan-${SWAN_VER}"     && apt-get -yqq remove          libnss3-dev libnspr4-dev pkg-config libpam0g-dev          libcap-ng-dev libcap-ng-utils libselinux1-dev          libcurl4-nss-dev libsystemd-dev flex bison gcc make          libunbound-dev xmlto perl-modules perl     && apt-get -yqq autoremove     && apt-get -y clean     && rm -rf /var/lib/apt/lists/*     && rm /etc/ipsec.secrets /etc/ppp/chap-secrets' returned a non-zero code: 2

Any idea ? Thanks.

@abiharbani
Copy link

This used to work for me back in 2016. Now I have a need to rebuild my image from source, but I'm getting the same Failed to get D-Bus connection: Unknown error -1 failure.

I managed to get the image built by replacing debian:jessie with debian:stretch. I haven't tested the functionality though. I'll report back once I confirm it's working.

@abiharbani
Copy link

Yes I can confirm that replacing debian:jessie with debian:stretch base image made it work.

@jgimenez
Copy link
Member

Thanks! I just updated the code with this

@oliv3
Copy link
Author

oliv3 commented May 31, 2019

Great, thanks !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants