Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
jarlah committed Oct 12, 2023
1 parent 20faba4 commit ac05521
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/reaper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule TestcontainersElixir.Reaper do
# FIXME this will surely not work for all use cases
Binds: ["/var/run/docker.sock:/var/run/docker.sock:rw"]
},
Env: ["RYUK_PORT=8080"]
Env: ["RYUK_PORT=#{@ryuk_port}"]
}
)

Expand All @@ -49,7 +49,7 @@ defmodule TestcontainersElixir.Reaper do

{:ok, socket} =
connection
|> create_socket(container, @ryuk_port)
|> create_ryuk_socket(container)

{:ok, socket}
end
Expand All @@ -75,12 +75,11 @@ defmodule TestcontainersElixir.Reaper do
:ok
end

defp create_socket(
defp create_ryuk_socket(
connection,
%DockerEngineAPI.Model.ContainerCreateResponse{Id: container_id},
port
%DockerEngineAPI.Model.ContainerCreateResponse{Id: container_id}
) do
port_str = "#{port}/tcp"
port_str = "#{@ryuk_port}/tcp"

{:ok,
%DockerEngineAPI.Model.ContainerInspectResponse{
Expand Down

0 comments on commit ac05521

Please sign in to comment.