Use local registry for app images
Allow applications to be deployed without needing to set up a repository in a remote Docker registry. If the registry server starts with `localhost`, Kamal will start a local docker registry on that port and push the app image to it. Then when pulling the image onto the servers, we use net-ssh to forward the that port from the app server to the deployment server. This will allow the deployment server to pull the image from the registry as if it were local, meaning we don't need to set up a cert.
This commit is contained in:
@@ -55,6 +55,14 @@ class CommandsRegistryTest < ActiveSupport::TestCase
|
||||
registry.logout.join(" ")
|
||||
end
|
||||
|
||||
test "registry setup" do
|
||||
assert_equal "docker start kamal-docker-registry || docker run --detach -p :5000 --name kamal-docker-registry registry:2", registry.setup.join(" ")
|
||||
end
|
||||
|
||||
test "registry remove" do
|
||||
assert_equal "docker stop kamal-docker-registry && docker rm kamal-docker-registry", registry.remove.join(" ")
|
||||
end
|
||||
|
||||
private
|
||||
def registry
|
||||
Kamal::Commands::Registry.new Kamal::Configuration.new(@config)
|
||||
|
||||
Reference in New Issue
Block a user