Docker build fails on ln -s on m1 mac
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 70
- Forks
- 104
- Avg merge
- 17h 46m
- Merged PRs (30d)
- 14
Description
M1 Mac w/ Mac OS 11.5.1
Docker Desktop: 4.0.0
Docker Engine: 20.10.8
Docker Compose: v2.0.0-rc.2
When running make docker_build, the build fails with the following message:
=> ERROR [5/6] RUN ln -s /usr/bin/python3.8 /usr/bin/python && /usr/bin/python3 -m pip install --upgrade pip && pip install -r /usr/local/src/xblock-sdk/requi 0.2s
------
> [5/6] RUN ln -s /usr/bin/python3.8 /usr/bin/python && /usr/bin/python3 -m pip install --upgrade pip && pip install -r /usr/local/src/xblock-sdk/requirements/dev.txt:
#9 0.174 /usr/bin/ln: failed to create symbolic link '/usr/bin/python': File exists
Seemed to resolve by having it first remove the link then recreate it by using ln -s -f
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running make docker_build and locate the Docker build step containing ln -s /usr/bin/python3.8 /usr/bin/python. Reproduce the existing-link failure on the reported M1 setup, then verify that the build completes and the Python and pip installation steps still work when the link already exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100