Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
blog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
blog
Commits
80c12624
Commit
80c12624
authored
7 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Added post on enabling docker TCP socket with Systemd socket activation.
parent
1bb7fac6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
content/docker_tcp_socket.rst
+22
-0
22 additions, 0 deletions
content/docker_tcp_socket.rst
with
22 additions
and
0 deletions
content/docker_tcp_socket.rst
0 → 100644
+
22
−
0
View file @
80c12624
Bind dockerd to a TCP port
##########################
:date: 2018-01-08
:summary: Bind dockerd to a TCP port
On a modern system (one running Systemd) when installing Docker, the
:code:`dockerd` daemon is run using Systemd' socket activation. By default the
socket is :code:`/var/run/docker.sock`. If you want to connect to a remote
machine over TCP, the obvious thing to do is to create
:code:`/etc/docker/daemon.json` and set the :code:`hosts` list there. But that
will conflict with the command line flags for socket activation. The correct way
is to override Systemd' socket activation config. Here's how (all command are as
:code:`root`):
.. code:: shell
mkdir -p /etc/systemd/system/docker.socket.d
echo '[Socket]' > /etc/systemd/system/docker.socket.d/tcp.conf
echo 'ListenStream=2375' >> /etc/systemd/system/docker.socket.d/tcp.conf
systemctl daemon-reload
systemctl restart docker
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment