ct-Open-Source / ct-Open-Source/tuya-convert
docker build doesn't update apk
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 523
- PR merge metrics
- No merged PRs in 30d
Description
Moin!
My docker build kept failing with the following error:
> => [2/6] RUN apk add --update bash git iw dnsmasq hostapd screen curl py3-pip py3-wheel python3-dev mosquitto haveged net-tools openssl openssl-dev gcc musl-dev linux-headers sudo coreutils grep iproute2 ncurses
=> => # fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
=> => # fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
=> => # ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.13/main: temporary error (try again later)
=> => # WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: No such file or directory
I didn't deep dive into the topic, but while building there seemed to be no internet access inside the container at all, while my host machine resolved all the links without a problem.
After detecting that the building without compose worked with "--network host" I added it in the docker compose file and it worked like a charm.
May the docker experts here analyze the problem, it worked for me and maybe it helps somebody out there :)
My changed part of the docker-compose file:
```
[...]
build:
context: .
network: host
dockerfile: Dockerfile
[...]```
Bjarne
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Dockerfile and docker-compose build configuration mentioned in the report, then reproduce the failing apk add step with docker compose build and compare it with the reported --network host build. Done means the container build can reliably fetch the Alpine package indexes and the relevant configuration or limitation is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100