PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

Docker image does not build on new version of windows docker #6063

Closed goedzo closed 7 years ago

goedzo commented 7 years ago

Just upgraded docker to the newest stable version 17.0.6.0-ce Win 18 (12627).

When I now build a new docker container (dev or master branch doesnt matter) the following error occurs. Log included: docker build --build-arg BUILD_BRANCH=dev -t pokemongo-bot . Sending build context to Docker daemon 5.494MB Step 1/13 : FROM alpine ---> 665ffb03bfae Step 2/13 : ARG BUILD_REPO=PokemonGoF/PokemonGo-Bot ---> Using cache ---> 6caa94da9d81 Step 3/13 : ARG BUILD_BRANCH=master ---> Using cache ---> e2f4732759f0 Step 4/13 : LABEL build_repo $BUILD_REPO build_branch $BUILD_BRANCH ---> Using cache ---> a2285a315904 Step 5/13 : WORKDIR /usr/src/app ---> Using cache ---> 3b5425538398 Step 6/13 : VOLUME /usr/src/app/configs /usr/src/app/web ---> Using cache ---> d1d8a8f24be9 Step 7/13 : RUN apk -U --no-cache add python py-pip tzdata && rm -rf /var/cache/apk/* && find / -name '*.pyc' -o -name '*.pyo' | xargs -rn1 rm -f ---> Using cache ---> 53da740a6ac3 Step 8/13 : ADD http://pgoapi.com/pgoencrypt.tar.gz /tmp/pgoencrypt.tar.gz Downloading 243.6kB/243.6kB ---> Using cache ---> 9471fde1345a Step 9/13 : ADD https://raw.githubusercontent.com/$BUILD_REPO/$BUILD_BRANCH/requirements.txt . Downloading 633B ---> Using cache ---> edc53490f26c Step 10/13 : RUN apk -U --no-cache add --virtual .build-dependencies python-dev gcc make musl-dev git && tar zxf /tmp/pgoencrypt.tar.gz -C /tmp && make -C /tmp/pgoencrypt/src && cp /tmp/pgoencrypt/src/libencrypt.so /usr/src/app/encrypt.so && ln -s locale.h /usr/include/xlocale.h && pip install --no-cache-dir -r requirements.txt && apk del .build-dependencies && rm -rf /var/cache/apk/* /tmp/pgoencrypt* /usr/include/xlocale.h && find / -name '*.pyc' -o -name '*.pyo' | xargs -rn1 rm -f ---> Running in 22c21348f7f2 fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gzfetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz (1/23) Upgrading musl (1.1.16-r9 -> 1.1.16-r10) (2/23) Installing pkgconf (1.3.7-r0) (3/23) Installing python2-dev (2.7.13-r1) (4/23) Installing binutils-libs (2.28-r2) (5/23) Installing binutils (2.28-r2) (6/23) Installing gmp (6.1.2-r0) (7/23) Installing isl (0.17.1-r0) (8/23) Installing libgomp (6.3.0-r4) (9/23) Installing libatomic (6.3.0-r4) (10/23) Installing libgcc (6.3.0-r4) (11/23) Installing mpfr3 (3.1.5-r0) (12/23) Installing mpc1 (1.0.3-r0) (13/23) Installing libstdc++ (6.3.0-r4) (14/23) Installing gcc (6.3.0-r4) (15/23) Installing make (4.2.1-r0) (16/23) Installing musl-dev (1.1.16-r10) (17/23) Installing ca-certificates (20161130-r2) (18/23) Installing libssh2 (1.8.0-r1) (19/23) Installing libcurl (7.54.0-r0) (20/23) Installing pcre (8.40-r2) (21/23) Installing git (2.13.0-r0) (22/23) Installing .build-dependencies (0) (23/23) Upgrading musl-utils (1.1.16-r9 -> 1.1.16-r10) Executing busybox-1.26.2-r5.trigger Executing ca-certificates-20161130-r2.trigger OK: 187 MiB in 45 packages tar: invalid magic tar: short read The command '/bin/sh -c apk -U --no-cache add --virtual .build-dependencies python-dev gcc make musl-dev git && tar zxf /tmp/pgoencrypt.tar.gz -C /tmp && make -C /tmp/pgoencrypt/src && cp /tmp/pgoencrypt/src/libencrypt.so /usr/src/app/encrypt.so && ln -s locale.h /usr/include/xlocale.h && pip install --no-cache-dir -r requirements.txt && apk del .build-dependencies && rm -rf /var/cache/apk/* /tmp/pgoencrypt* /usr/include/xlocale.h && find / -name '*.pyc' -o -name '*.pyo' | xargs -rn1 rm -f' returned a non-zero code: 1

In red, these errors are shown: tar: invalid magic tar: short read

goedzo commented 7 years ago

As a test, I downgraded Docker to version Version 17.03.1-ce-win12 (12058) and now the build goes sucessfully. So not sure how to see this issue. Is it the build process, or docker environment? Not sure here.

goedzo commented 7 years ago

I have found the reason of this error. It seems that it was a problem with the CA certificates on Alpine Linux. It does not succesfully loads http://pgoapi.com/pgoencrypt.tar.gz because it cannot connect to the web domain, because of missing certificates. I will push a fix to this.

goedzo commented 7 years ago

Merged, so issue is closed