Skip to content

Using Docker rootless: how to connect to mail server running on another user #274

Answered by daks
daks asked this question in Q&A
Discussion options

You must be logged in to vote

After searching for hours or days, I finally found a solution to enable a container running in Docker rootless to access the host itself. I will document it here in case it may help someone else:

  • use a recent version of Docker. I think it's at least version 26. For me it meant not use Debian packages but instead docker-ce ones from Docker apt repository
  • install Docker rootless per user as usual
  • configure rootlesskit to enable host loopback access by adding a file ~/.config/systemd/user/docker.service.d/override.conf with
[Service]
Environment="DOCKERD_ROOTLESS_ROOTLESSKIT_DISABLE_HOST_LOOPBACK=false"
  • daemon-reload systemd and restart docker service
  • enjoy :)

Relevant PR in moby project

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@pabzm
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by daks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants