diff options
author | pmikus <peter.mikus@protonmail.ch> | 2023-04-28 11:27:25 +0000 |
---|---|---|
committer | pmikus <peter.mikus@protonmail.ch> | 2023-04-28 11:27:25 +0000 |
commit | d14b7a69e628582b9132abc1b6e09aada68c0077 (patch) | |
tree | 4ac651bd5240093f82580656bf5a95639c976fa3 /fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2 | |
parent | f451c7a50bc663a6727f01873b8663bfa9ae22e1 (diff) |
feat(ansible): Refactor docker-image roles
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: I6731e55b9643f46463c16f68e4986e3cb61f843f
Diffstat (limited to 'fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2')
-rw-r--r-- | fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2 | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2 b/fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2 new file mode 100644 index 0000000000..0cbe6c5590 --- /dev/null +++ b/fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2 @@ -0,0 +1,61 @@ +version: "3" +services: + tg-0: + build: + context: "base/" + dockerfile: "Dockerfile" + command: ["/usr/sbin/sshd","-D", "-p", "6001"] + expose: + - "6001" + hostname: "{{ ansible_hostname }}" + networks: + tg-nw-0: + privileged: true + ports: + - "6001:6001" + restart: "always" + shm_size: "4G" + devices: + - "/dev/hugepages:/dev/hugepages" + - "/dev/vfio:/dev/vfio" + volumes: + - type: "bind" + source: "/etc/sudoers" + target: "/etc/sudoers" + - type: "bind" + source: "/opt/" + target: "/opt/" + - type: "bind" + source: "/usr/lib/firmware/" + target: "/usr/lib/firmware/" + tg-1: + build: + context: "base/" + dockerfile: "Dockerfile" + command: ["/usr/sbin/sshd","-D", "-p", "6002"] + expose: + - "6002" + hostname: "{{ ansible_hostname }}" + networks: + tg-nw-1: + privileged: true + ports: + - "6002:6002" + restart: "always" + shm_size: "4G" + devices: + - "/dev/hugepages:/dev/hugepages" + - "/dev/vfio:/dev/vfio" + volumes: + - type: "bind" + source: "/etc/sudoers" + target: "/etc/sudoers" + - type: "bind" + source: "/opt/" + target: "/opt/" + - type: "bind" + source: "/usr/lib/firmware/" + target: "/usr/lib/firmware/" +networks: + tg-nw-0: + tg-nw-1:
\ No newline at end of file |