barefoot
barefoot copied to clipboard
Docker build fails at gradlew assemble
When building the docker image according to the instructions, I get the error
Downloading http://services.gradle.org/distributions/gradle-1.4-bin.zip
Unzipping /root/.gradle/wrapper/dists/gradle-1.4-bin/47n6g3pbi5plc7n8fn58nkinje/gradle-1.4-bin.zip to /root/.gradle/wrapper/dists/gradle-1.4-bin/47n6g3pbi5plc7n8fn58nkinje
Exception in thread "main" java.util.zip.ZipException: zip file is empty
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:221)
at java.util.zip.ZipFile.<init>(ZipFile.java:151)
at java.util.zip.ZipFile.<init>(ZipFile.java:165)
at org.gradle.wrapper.Install.unzip(Install.java:148)
at org.gradle.wrapper.Install.createDist(Install.java:65)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
The command '/bin/sh -c cd /opt/ && git clone https://github.com/openstreetmap/osmosis.git && cd osmosis && git checkout tags/0.43.1 && ./gradlew assemble && echo "export PATH=${PATH}:/opt/osmosis/package/bin" >
> /root/.bashrc' returned a non-zero code: 1
This happens at the layer
RUN cd /opt/ && git clone https://github.com/openstreetmap/osmosis.git && cd osmosis && git checkout tags/0.43.1 && ./gradlew assemble && echo "export PATH=${PATH}:/opt/osmosis/package/bin" >> /root/.bashrc
I'm using the latest commit (1faaea46f171415d745f3cbaf26d3df725d5b580)))
The Issue seems to be the link is missing an https://
http://services.gradle.org/distributions/gradle-1.4-bin.zip Does not Work https://services.gradle.org/distributions/gradle-1.4-bin.zip Does work.
It would be nice if they patched this.
[Temporary Fix] Change line 21 of /map/Dockerfile From && git checkout tags/0.43.1 to && git checkout f4dd495e3af03d0a2048e6a541dc052a77102c18
This forces the build to use an updated version of osmosis with an https:// url for gradle distribution.
The Issue seems to be the link is missing an https://
http://services.gradle.org/distributions/gradle-1.4-bin.zip Does not Work https://services.gradle.org/distributions/gradle-1.4-bin.zip Does work.
It would be nice if they patched this.
[Temporary Fix] Change line 21 of /map/Dockerfile From && git checkout tags/0.43.1 to && git checkout f4dd495e3af03d0a2048e6a541dc052a77102c18
This forces the build to use an updated version of osmosis with an https:// url for gradle distribution.
This still hasn't been fixed, because I just ran into it.
The Issue seems to be the link is missing an https:// http://services.gradle.org/distributions/gradle-1.4-bin.zip Does not Work https://services.gradle.org/distributions/gradle-1.4-bin.zip Does work. It would be nice if they patched this. [Temporary Fix] Change line 21 of /map/Dockerfile From && git checkout tags/0.43.1 to && git checkout f4dd495e3af03d0a2048e6a541dc052a77102c18 This forces the build to use an updated version of osmosis with an https:// url for gradle distribution.
This still hasn't been fixed, because I just ran into it.
I replaced the Run command with the following(using openjdk-8-jdk and osmosis 0.47.4).Then it works.
RUN apt-get -y install software-properties-common && apt-get update && add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get -y install patch postgresql-9.3-postgis-2.1 git openjdk-8-jdk python-psycopg2 python-numpy python-gdal RUN patch /etc/postgresql/9.3/main/postgresql.conf < /opt/pgsql/postgresql.conf.patch && patch /etc/postgresql/9.3/main/pg_hba.conf < /opt/pgsql/pg_hba.conf.patch && echo "export HOME=/root" >> /root/.bashrc RUN cd /opt/ && git clone https://github.com/openstreetmap/osmosis.git && cd osmosis && git checkout 0.47.4 && ./gradlew assemble && echo "export PATH=${PATH}:/opt/osmosis/package/bin" >> /root/.bashrc CMD service postgresql start && /bin/bash --rcfile /root/.bashrc