ewolff/microservice-consul

docker-compose build fails

Closed this issue · 3 comments

Tried this example on 2 separate systems with a fresh docker install downloaded today (Windows PC with docker-toolbox, Mac OS 10-13-2 with docker community edition). Docker-Compose fails each time with the following error:

temps-MBP-10:docker$` docker-compose build
consul uses an image, skipping
Building customer
Step 1/4 : FROM ewolff/docker-java
latest: Pulling from ewolff/docker-java
88286f41530e: Pull complete
77f0b91330fc: Pull complete
790574b86b13: Pull complete
Digest: sha256:e4bbad9a7a45bd16820f22d1b1dbcf0869c314a28e7e294d7aaeb050bd8a3561
Status: Downloaded newer image for ewolff/docker-java:latest
 ---> 54ad137c4841
Step 2/4 : COPY target/microservice-consul-demo-customer-0.0.1-SNAPSHOT.jar .
 ---> ca5c901acf94
Step 3/4 : CMD /usr/bin/java -Dlogging.path=/log/ -Xmx400m -Xms400m -jar microservice-consul-demo-customer-0.0.1-SNAPSHOT.jar
 ---> Running in e5d39110ae77
 ---> ca014c440bd6
Removing intermediate container e5d39110ae77
Step 4/4 : EXPOSE 8080
 ---> Running in e6cba9bb12ce
 ---> 7ede21140584
Removing intermediate container e6cba9bb12ce
Successfully built 7ede21140584
Successfully tagged msconsul_customer:latest
Building catalog
Step 1/4 : FROM ewolff/docker-java
 ---> 54ad137c4841
Step 2/4 : COPY target/microservice-consul-demo-catalog-0.0.1-SNAPSHOT.jar .
 ---> 64a53ce8d8ff
Step 3/4 : CMD /usr/bin/java -Dlogging.path=/log/ -Xmx400m -Xms400m -jar microservice-consul-demo-catalog-0.0.1-SNAPSHOT.jar
 ---> Running in 23d275329b14
 ---> ccdc7334170d
Removing intermediate container 23d275329b14
Step 4/4 : EXPOSE 8080
 ---> Running in 96b11eb2a3b9
 ---> 92b24f25747e
Removing intermediate container 96b11eb2a3b9
Successfully built 92b24f25747e
Successfully tagged msconsul_catalog:latest
Building apache
Step 1/9 : FROM ubuntu:15.04
15.04: Pulling from library/ubuntu
9502adfba7f1: Pull complete
4332ffb06e4b: Pull complete
2f937cc07b5f: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:2fb27e433b3ecccea2a14e794875b086711f5d49953ef173d8a03e8707f1510f
Status: Downloaded newer image for ubuntu:15.04
 ---> d1b55fd07600
Step 2/9 : RUN apt-get update ; apt-get dist-upgrade -y -qq
 ---> Running in fbd4822776e6
Ign http://archive.ubuntu.com vivid InRelease
Ign http://archive.ubuntu.com vivid-updates InRelease
Ign http://archive.ubuntu.com vivid-security InRelease
Ign http://archive.ubuntu.com vivid Release.gpg
Ign http://archive.ubuntu.com vivid-updates Release.gpg
Ign http://archive.ubuntu.com vivid-security Release.gpg
Ign http://archive.ubuntu.com vivid Release
Ign http://archive.ubuntu.com vivid-updates Release
Ign http://archive.ubuntu.com vivid-security Release
Ign http://archive.ubuntu.com vivid/main amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com vivid/restricted amd64 Packages/DiffIndex
Err http://archive.ubuntu.com vivid/main Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid/restricted Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid/universe Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid/universe amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-updates/main Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-updates/restricted Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-updates/universe Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-updates/main amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-updates/restricted amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-updates/universe amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-security/main Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-security/restricted Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-security/universe Sources
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-security/main amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-security/restricted amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid-security/universe amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid/main amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
Err http://archive.ubuntu.com vivid/restricted amd64 Packages
  404  Not Found [IP: 91.189.88.162 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid/main/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid/restricted/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid/universe/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-updates/main/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-updates/restricted/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-updates/universe/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-updates/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-updates/restricted/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-updates/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-security/main/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-security/restricted/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-security/universe/source/Sources  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-security/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-security/restricted/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid-security/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid/main/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/vivid/restricted/binary-amd64/Packages  404  Not Found [IP: 91.189.88.162 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
 ---> 1969f95efaed
Removing intermediate container fbd4822776e6
Step 3/9 : RUN apt-get install -y -qq libapache2-mod-proxy-html apache2 &&     a2enmod proxy proxy_http proxy_ajp rewrite deflate headers proxy_balancer proxy_connect proxy_html lbmethod_byrequests &&     mkdir /var/lock/apache2 && mkdir /var/run/apache2
 ---> Running in b052b5d368d5
E: Package 'libapache2-mod-proxy-html' has no installation candidate
ERROR: Service 'apache' failed to build: The command '/bin/sh -c apt-get install -y -qq libapache2-mod-proxy-html apache2 &&     a2enmod proxy proxy_http proxy_ajp rewrite deflate headers proxy_balancer proxy_connect proxy_html lbmethod_byrequests &&     mkdir /var/lock/apache2 && mkdir /var/run/apache2' returned a non-zero code: 100
temps-MBP-10:docker rainer$ 

I am new to docker, so I do not know how to fix this :)

I got it working by upgrading to the latest ubuntu and omitting the apache-lib in the apache/Dockerfile:

FROM ubuntu:17.10
  
# Update Ubuntu
RUN apt-get update ; apt-get dist-upgrade -y -qq

I can open a pull request, if you think that's necessary.

This problem is fixed with 9ac59f2 (upgrade to Ubuntu 17.10) and 3ce16ce downgraded to Ubuntu 16.04 LTS to solve the problem in the long run, too.