tiktok-scraper
tiktok-scraper copied to clipboard
Docker Build Fails
Describe the bug
Building docker image fails on RUN apk update && apk add --update nodejs nodejs-npm
step
If fields below will be empty then issue will be Ignored and Closed
To Reproduce Steps to reproduce the behavior:
- OS: Windows 10 / Mac OS Big Sur
- NodeJs Version : N/A
- Scraper Version : 1.4.33
- clone repository
- run
docker build . -t tiktok-scraper
(add the--no-cache
option if you've previously build the image
Screenshots If applicable, add screenshots to help explain your problem. Logs from Win10:
PS <My_PWD>\tiktok-scraper> docker build . -t tiktok-scraper
[+] Building 10.8s (7/18)
=> [internal] load build definition from Dockerfile 0.5s
=> => transferring dockerfile: 822B 0.0s
=> [internal] load .dockerignore 0.5s
=> => transferring context: 163B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 4.6s
=> [internal] load build context 0.4s
=> => transferring context: 752.45kB 0.1s
=> [tiktok_scraper.build 1/9] FROM docker.io/library/alpine:latest@sha256:234cb88d3020898 2.2s
=> => resolve docker.io/library/alpine:latest@sha256:234cb88d3020898631af0ccbbcca9a66ae73 0.1s
=> => sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007 1.64kB / 1.64kB 0.0s
=> => sha256:1775bebec23e1f3ce486989bfc9ff3c4e951690df84aa9f926497d82f2ffca9d 528B / 528B 0.0s
=> => sha256:d4ff818577bc193b309b355b02ebc9220427090057b54a59e73b79bdfe13 1.47kB / 1.47kB 0.0s
=> => sha256:5843afab387455b37944e709ee8c78d7520df80f8d01cf7f861aae63beed 2.81MB / 2.81MB 0.7s
=> => extracting sha256:5843afab387455b37944e709ee8c78d7520df80f8d01cf7f861aae63beeddb6b 0.4s
=> [tiktok_scraper.build 2/9] WORKDIR /usr/app 0.4s
=> ERROR [tiktok_scraper.build 3/9] RUN apk update && apk add --update nodejs nodejs-npm 2.7s
------
> [tiktok_scraper.build 3/9] RUN apk update && apk add --update nodejs nodejs-npm python3 pkgconfig pixman-dev:
#6 0.782 fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
#6 1.163 fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
#6 2.026 v3.14.0-114-g8a8c96a0ea [https://dl-cdn.alpinelinux.org/alpine/v3.14/main]
#6 2.026 v3.14.0-115-g2c38559640 [https://dl-cdn.alpinelinux.org/alpine/v3.14/community]
#6 2.026 OK: 14932 distinct packages available
#6 2.460 nodejs-npm (no such package):
#6 2.460 ERROR: unable to select packages:
#6 2.529 required by: world[nodejs-npm]
------
executor failed running [/bin/sh -c apk update && apk add --update nodejs nodejs-npm python3 pkgconfig pixman-dev]: exit code: 1
I had the same issue. Changing
FROM alpine:latest AS tiktok_scraper.build
to
FROM alpine:3.13.5 AS tiktok_scraper.build
fixes it. It's an issue with the latest alpine build I think.
Edit: You also need to change alpine version at line 18.
I had the same issue. Changing
FROM alpine:latest AS tiktok_scraper.build
to
FROM alpine:3.13.5 AS tiktok_scraper.build
fixes it. It's an issue with the latest alpine build I think.
Edit: You also need to change alpine version at line 18.
This helped me too, thanks!
Duplicate of #629
I made PR #717 to fix this problem. I believe the exact version of alpine should be fixed for build reproducibility.