Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit a553adc

Browse files
committed
Ensure additional docker command parameters are propagated
1 parent 8c1e58f commit a553adc

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

test/makina/models/docker_test.exs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,33 @@ defmodule Makina.Models.DockerTest do
7676
"docker run -d --restart always --name foo --label org.makina.app.hash=#{app.__hash__} --env ENV=prod nginx:1.16"
7777
end
7878
end
79+
80+
test "contains command arguments" do
81+
server =
82+
Server.new(host: "example.com")
83+
|> Server.put_private(:conn_ref, self())
84+
85+
app =
86+
Application.new(name: "foo")
87+
|> Application.set_docker_image(name: "traefik", tag: "v3.3")
88+
|> Application.put_volume(
89+
source: "/var/run/docker.sock",
90+
destination: "/var/run/docker.sock"
91+
)
92+
93+
app =
94+
app
95+
|> Application.set_private(:__docker__, %{
96+
app.__docker__
97+
| command: [
98+
"--api.insecure=true",
99+
"--providers.docker"
100+
]
101+
})
102+
103+
cmd = Docker.run(server, app)
104+
105+
assert cmd.cmd ==
106+
"docker run -d --restart always --name foo --label org.makina.app.hash=#{app.__hash__} --volume /var/run/docker.sock:/var/run/docker.sock traefik:v3.3 --api.insecure=true --providers.docker"
107+
end
79108
end

0 commit comments

Comments
 (0)