how to export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock using shell script automatically.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 18/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, shell
- Domain
- devops, operating-systems
Research direction
No repository file or test is named. Start by reproducing the shell script on Ubuntu and compare the environment in the current shell with a newly launched shell after writing ~/.bashrc; done means the rootless Docker client sees the intended DOCKER_HOST automatically.
Written by the indexing model from the issue text.
Description
Hi,
I would like to automate these steps to install docker as the rootless user for that I've created shell script.but while doing echo "export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock" using shell script it is not working.on manual, it is working fine.
export USERID=$( id |grep uid | awk -F '[ ]' '{print $1}' | awk -F '[(]' '{print $1}'| awk -F '[=]' '{print $2}')
sudo apt-get install -y uidmap
curl -fsSL https://get.docker.com/rootless | sh
echo "DOCKER_HOST=unix:///run/user/${USERID}/docker.sock">>~/.bashrc
systemctl --user status docker
systemctl --user start docker
Even though if I export this value to ~/.bashrc, it is not showing in system environment.
Could you please let me know how I can automatically add this value as env on the ubuntu machine.
Thanks
Rohit Thakur.
- Dominant language
- Shell
- Stars
- 3.2k
- Forks
- 863
- Avg merge
- 3h 15m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
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.
More from docker/docker-install
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
docker/docker-install#575 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
docker/docker-install#559 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
docker/docker-install#554 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
docker/docker-install#548 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
docker/docker-install#540 ·
All issues in docker/docker-install
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
astral-sh/python-build-standalone#1293 ·
-
package-update
Difficulty 1/5 Under an hour Newbie friendliness 90/100
oSoWoSo/vOid_Community_repOsitory#185 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
carbon-language/carbon-lang#7821 ·