Compare commits

...

9 Commits

Author SHA1 Message Date
Donal McBreen
62dfa45ee6 Bump version for 2.5.3 2025-02-27 10:27:27 +00:00
Donal McBreen
c13ee578df Merge pull request #1420 from smartygus/docker-build-fix
Fix Docker Build under Ruby 3.4
2025-02-27 09:42:57 +00:00
Michael Smart
f01238112e Update nokogiri to 1.18.3
See: https://github.com/sparklemotion/nokogiri/releases/tag/v1.18.0

- required for ruby 3.4 compatibility
- add more platforms to lockfile to support
  docker build process, due to changes
  in the nokogiri native gem setup where
  -musl and -gnu linux platforms are no longer
  interchangeable
- bundler >= 2.5.6 required according to Nokogiri release
  notes, so updated to current latest version (2.6.5)
2025-02-21 13:23:08 +01:00
Donal McBreen
6f29d4e78b Bump version for 2.5.2 2025-02-07 15:27:30 +00:00
Donal McBreen
9d2dda0d77 Merge pull request #1402 from basecamp/fix-docker-build
Fix the docker build
2025-02-06 14:59:14 +00:00
Donal McBreen
b130bc0321 Fix the docker build
Somewhere along the way the docker build broke, it now needs yaml-dev
to be installed. Maybe the underlying image changed?

Update to 3.4-alpine while we are here.
2025-02-06 14:45:37 +00:00
Donal McBreen
28be0300b9 Bump version for 2.5.1 2025-02-06 13:54:46 +00:00
Donal McBreen
3c2163ab78 Merge pull request #1401 from basecamp/avoid-docker-check-with-skipping-local
Only check for docker when logging in locally
2025-02-06 11:35:49 +00:00
Donal McBreen
fdf7e6927a Only check for docker when logging in locally
If we are skipping a local registry login, we don't need docker
installed locally.

Fixes: https://github.com/basecamp/kamal/issues/1400
2025-02-06 11:12:56 +00:00
5 changed files with 28 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
FROM ruby:3.3-alpine FROM ruby:3.4-alpine
# Install docker/buildx-bin # Install docker/buildx-bin
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
@@ -13,9 +13,9 @@ COPY Gemfile Gemfile.lock kamal.gemspec ./
COPY lib/kamal/version.rb /kamal/lib/kamal/version.rb COPY lib/kamal/version.rb /kamal/lib/kamal/version.rb
# Install system dependencies # Install system dependencies
RUN apk add --no-cache build-base git docker openrc openssh-client-default \ RUN apk add --no-cache build-base git docker openrc openssh-client-default yaml-dev \
&& rc-update add docker boot \ && rc-update add docker boot \
&& gem install bundler --version=2.4.3 \ && gem install bundler --version=2.6.5 \
&& bundle install && bundle install
# Copy the rest of our application code into the container. # Copy the rest of our application code into the container.

View File

@@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
kamal (2.5.0) kamal (2.5.3)
activesupport (>= 7.0) activesupport (>= 7.0)
base64 (~> 0.2) base64 (~> 0.2)
bcrypt_pbkdf (~> 1.0) bcrypt_pbkdf (~> 1.0)
@@ -48,8 +48,6 @@ GEM
ast (2.4.2) ast (2.4.2)
base64 (0.2.0) base64 (0.2.0)
bcrypt_pbkdf (1.1.1) bcrypt_pbkdf (1.1.1)
bcrypt_pbkdf (1.1.1-arm64-darwin)
bcrypt_pbkdf (1.1.1-x86_64-darwin)
benchmark (0.4.0) benchmark (0.4.0)
bigdecimal (3.1.8) bigdecimal (3.1.8)
builder (3.3.0) builder (3.3.0)
@@ -84,11 +82,15 @@ GEM
net-sftp (4.0.0) net-sftp (4.0.0)
net-ssh (>= 5.0.0, < 8.0.0) net-ssh (>= 5.0.0, < 8.0.0)
net-ssh (7.3.0) net-ssh (7.3.0)
nokogiri (1.17.2-arm64-darwin) nokogiri (1.18.3-aarch64-linux-musl)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.17.2-x86_64-darwin) nokogiri (1.18.3-arm64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.17.2-x86_64-linux) nokogiri (1.18.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.18.3-x86_64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.3-x86_64-linux-musl)
racc (~> 1.4) racc (~> 1.4)
ostruct (0.6.1) ostruct (0.6.1)
parallel (1.26.3) parallel (1.26.3)
@@ -177,9 +179,11 @@ GEM
zeitwerk (2.7.1) zeitwerk (2.7.1)
PLATFORMS PLATFORMS
aarch64-linux-musl
arm64-darwin arm64-darwin
x86_64-darwin x86_64-darwin
x86_64-linux x86_64-linux
x86_64-linux-musl
DEPENDENCIES DEPENDENCIES
debug debug
@@ -189,4 +193,4 @@ DEPENDENCIES
rubocop-rails-omakase rubocop-rails-omakase
BUNDLED WITH BUNDLED WITH
2.4.3 2.6.5

View File

@@ -3,7 +3,7 @@ class Kamal::Cli::Registry < Kamal::Cli::Base
option :skip_local, aliases: "-L", type: :boolean, default: false, desc: "Skip local login" option :skip_local, aliases: "-L", type: :boolean, default: false, desc: "Skip local login"
option :skip_remote, aliases: "-R", type: :boolean, default: false, desc: "Skip remote login" option :skip_remote, aliases: "-R", type: :boolean, default: false, desc: "Skip remote login"
def login def login
ensure_docker_installed ensure_docker_installed unless options[:skip_local]
run_locally { execute *KAMAL.registry.login } unless options[:skip_local] run_locally { execute *KAMAL.registry.login } unless options[:skip_local]
on(KAMAL.hosts) { execute *KAMAL.registry.login } unless options[:skip_remote] on(KAMAL.hosts) { execute *KAMAL.registry.login } unless options[:skip_remote]

View File

@@ -1,3 +1,3 @@
module Kamal module Kamal
VERSION = "2.5.0" VERSION = "2.5.3"
end end

View File

@@ -52,6 +52,18 @@ class CliRegistryTest < CliTestCase
assert_raises(Kamal::Cli::DependencyError) { run_command("login") } assert_raises(Kamal::Cli::DependencyError) { run_command("login") }
end end
test "allow remote login with no docker" do
stub_setup
SSHKit::Backend::Abstract.any_instance.stubs(:execute)
.with(:docker, "--version", "&&", :docker, :buildx, "version")
.raises(SSHKit::Command::Failed.new("command not found"))
SSHKit::Backend::Abstract.any_instance.stubs(:execute)
.with { |*args| args[0..1] == [ :docker, :login ] }
assert_nothing_raised { run_command("login", "--skip-local") }
end
private private
def run_command(*command) def run_command(*command)