Skip to content

Commit

Permalink
Docker TCP
Browse files Browse the repository at this point in the history
  • Loading branch information
lholota committed Sep 23, 2024
1 parent b99a34b commit 936fb2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions roles/docker/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
max-size: "{{ docker_logs_max_size }}"
max-file: "{{ docker_logs_max_files }}"

- name: Enable access to Docker daemon over TCP
when: docker_enable_tcp
ansible.builtin.set_fact:
docker_daemon_options: "{{ docker_daemon_options | combine(docker_daemon_options_tcp) }}"

- name: Define Docker daemon options for nvidia runtime
when: docker_enable_nvidia_runtime
ansible.builtin.set_fact:
Expand Down
7 changes: 6 additions & 1 deletion roles/docker/vars/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ docker_daemon_options_nvidia:
runtimes:
nvidia:
args: []
path: "nvidia-container-runtime"
path: "nvidia-container-runtime"

docker_daemon_options_tcp:
hosts:
- "tcp://0.0.0.0:2375"
- "unix:///var/run/docker.sock"

0 comments on commit 936fb2c

Please sign in to comment.