This builds linux based image containting devlopment tools from tools repository.
- bash
- zsh
- fish
- amd64
- arm64
- nvm
- pyenv
- git
docker pull dmascot/devtoolsbashdevwith default bash shell login,this is as well default userzshdevwith default zsh shell loginfshdevwith default fish shell login
The main process in this conatiner is a respective login shell, meaning if you simply press ctrl +c or type exit container will stop.If you want to exist container without stoping it,use the detach squence ctrl+p ctrl+q
-
- bash shell based container
docker run --rm --name devtools --hostname devtools -it dmascot/devtools- zsh shell based container
docker run --rm --name devtools --hostname devtools --user zshdev -it dmascot/devtools- fish shell based container
docker run --rm --name devtools --hostname devtools --user fshdev -it dmascot/devtools -
Create container
- bash shell based container
docker create --name devtools --hostname devtools -it dmascot/devtools- zsh shell based container
docker create --name devtools --hostname devtools --user zshdev -it dmascot/devtools- fish shell based container
docker create --name devtools --hostname devtools --user fshdev -it dmascot/devtoolsStart container
docker start devtoolsAttach to container
docker attach devtools
It can be fairly tricky to build multi arch image, the particular problem I was facing is while building arm64 image using github action it was not deployign tools for bash or zsh users and, failing
After all debugging it boiled down to supply pre-defined CURRENT_SHELL varible in docker build instead of picking shell from process. Since, doing so would pick shell as qemuaarch64 or some other qemu shell.However, being able to debug it locally helped process to nail the issue.
To debug locally,you may use following steps
- create docker buildx
docker buildx create --use --name multiarch --driver docker-container --bootstrap
- build docker image with troubleing or all platform
docker buildx build --no-cache --platform linux/amd64,linux/arm64 --tag dmascot/tools:latest --progress plain -f docker/Dockerfile .
observer the output and try to follow through, this really depends on how well your script/tool spills out details
- finally delete buildx and prune cache
docker buildx rm multiarch && docker buildx prune