Commit cf124413 authored by nanahira's avatar nanahira

custom docker dir

parent e4a45c67
Pipeline #12065 failed with stage
in 10 seconds
...@@ -32,3 +32,4 @@ railgun: ...@@ -32,3 +32,4 @@ railgun:
laptop: false laptop: false
extra_params: [] extra_params: []
nfs: false nfs: false
docker_root: /var/lib/docker
...@@ -107,11 +107,14 @@ ...@@ -107,11 +107,14 @@
url: 'https://cdn02.moecube.com:444/init/docker-compose-linux-{{ansible_architecture}}' url: 'https://cdn02.moecube.com:444/init/docker-compose-linux-{{ansible_architecture}}'
dest: '{{ansible_user_dir}}/.docker/cli-plugins/docker-compose' dest: '{{ansible_user_dir}}/.docker/cli-plugins/docker-compose'
mode: '0755' mode: '0755'
- name: docker 配置 创建目录 - name: docker 创建目录
become: true become: true
file: file:
name: /etc/docker name: '{{item}}'
state: directory state: directory
with_items:
- '/etc/docker'
- '{{docker_root}}'
- name: docker 配置 - name: docker 配置
become: true become: true
template: template:
......
{ {
{% if registry %} {% if registry %}
"registry-mirrors": [ "registry-mirrors": [
"{{registry}}" "{{registry}}"
], ],
{% endif %} {% endif %}
{% if nvidia_driver_version and ansible_os_family == 'Debian' %} {% if nvidia_driver_version and ansible_os_family == 'Debian' %}
"runtimes": { "runtimes": {
"nvidia": { "nvidia": {
...@@ -15,6 +13,7 @@ ...@@ -15,6 +13,7 @@
} }
}, },
{% endif %} {% endif %}
"data-root": "{{docker_root}}",
"live-restore": true, "live-restore": true,
"log-driver": "json-file", "log-driver": "json-file",
"log-opts": { "log-opts": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment