Skip to content

feat: Add images with another docker versions - #17

Open
Kolobok12309 wants to merge 8 commits into
kitconcept:mainfrom
educorg:feat/custom-docker-version
Open

feat: Add images with another docker versions#17
Kolobok12309 wants to merge 8 commits into
kitconcept:mainfrom
educorg:feat/custom-docker-version

Conversation

@Kolobok12309

Copy link
Copy Markdown

Mb someone has same problem, our server don't support docker 29, action version from 1.2.0 don't supported by ghcr.

@ericof

ericof commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @Kolobok12309 — and sorry for the slow response. The repository now has a test suite and CI (#22), so this can get a proper review.

The underlying need looks legitimate to me, but I would like to understand the failure before committing to a permanent build matrix, and there are two defects in the current diff I need to flag.

First, the actual error

Could you post:

  • the failing log from the action (with debug: 1 if possible), and
  • docker version from the remote Swarm manager?

"Doesn't support docker 29" could be a few different things — API version negotiation against an older daemon, the SSH transport (docker system dial-stdio, which needs docker ≥ 18.09 on the remote), or something specific to docker stack deploy. The right fix differs for each, and a version matrix only helps for the first. I would rather not ship one and find it does not solve your problem.

One correction while we are here: the base image moved to docker 29 in v1.3.0, not 1.2.0 — v1.2.0 and earlier used alpinelinux/docker-cli:latest. And 1.2.0 is still published on ghcr (1, 1.0, 1.0.0, 1.0.1, 1.1, 1.1.0, 1.2, 1.2.0, 1.3.0, 1.4.0 and latest are all there), so pinning @v1.2.0 should still work as a stopgap. It is an unmaintained image, but nothing was deleted.

Defect 1: both matrix legs would push an unsuffixed :latest

The latest tag is generated in two independent ways here:

  • type=raw,value=latest,enable=<ref == default branch> — this does pick up flavor: suffix.
  • the implicit latest=auto flavor, which fires on a tag push because type=semver is in the tags list — and this ignores suffix unless onlatest=true (suffixLatest defaults to false in docker/metadata-action).

So on a v* tag push both legs of the matrix generate a bare :latest, and whichever finishes last wins. Roughly half the time ghcr.io/kitconcept/docker-stack-deploy:latest would end up being the docker 28 image — intermittently, and affecting everyone who does not pin.

Fixable with suffix=-docker-28,onlatest=true, or latest=false on the non-default legs.

Defect 2: it drops the base image pin

ARG DOCKER_IMAGE_TAG=29-cli
FROM docker:${DOCKER_IMAGE_TAG}

This replaces the pinned docker:29.5.3-cli-alpine3.23 with a floating 29-cli, which:

If the matrix goes ahead, the ARG default should be the full pinned tag and the matrix should pass full pinned tags too.

Defect 3: the extra variant would be untested

Dockerfile.test builds FROM the action image and make test only builds the default, so the docker 28 image would ship with no test coverage. ci.yml would need to run the suite per matrix entry.


None of that is meant to discourage you — if the old-daemon incompatibility is real, I am happy to take a reworked version of this and credit you as co-author. I just want the error first so we fix the right thing.

@Kolobok12309

Copy link
Copy Markdown
Author

docker version from server.
Old version because it metal server with old ubuntu and we can't easy update now

Client: Docker Engine - Community
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:52:13 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f
  Built:            Thu May 25 21:52:13 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

You was right about v1.2.0 of action it worked. Now i haven't full logs, found only this message Container Registry: Login to ghcr.io as *** failed from past. Now i can't reproduce it, set v1.2.0 and it worked

About 1.3.0+

Short version

Environment Variables: Additional values
  Container Registry: Logged in ghcr.io as ***
  SSH client: Configured
  SSH client: Added private key
  SSH remote: Keys added to /root/.ssh/known_hosts
  ** WARNING: connection is not using a post-quantum key exchange algorithm.
  ** This session may be vulnerable to "store now, decrypt later" attacks.
  ** The server may need to be upgraded. See https://openssh.com/pq.html
  SSH connect: Success
  Since --detach=false was not specified, tasks will be created in the background.
  In a future release, --detach=false will become the default.
  Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.43
  Deploy: Failed to deploy *** from file ***
Debug version
##[debug]Evaluating condition for step: 'Deploy'
  ##[debug]Evaluating: success()
  ##[debug]Evaluating success:
  ##[debug]=> true
  ##[debug]Result: true
  ##[debug]Starting: Deploy
  ##[debug]Loading inputs
  ##[debug]Evaluating: inputs.docker_registry
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'docker_registry'
  ##[debug]=> 'ghcr.io'
  ##[debug]Result: 'ghcr.io'
  ##[debug]Evaluating: inputs.docker_user
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'docker_user'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.docker_password
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'docker_password'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.ssh_host
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'ssh_host'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.ssh_user
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'ssh_user'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.ssh_port
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'ssh_port'
  ##[debug]=> '22'
  ##[debug]Result: '22'
  ##[debug]Evaluating: inputs.ssh_key
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'ssh_key'
  ##[debug]=> '***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***'
  ##[debug]Result: '***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***'
  ##[debug]Evaluating: inputs.swarm_template_file
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'swarm_template_file'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.swarm_stack_name
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'swarm_stack_name'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: format('IMAGE={0}
  ##[debug]{1}
  ##[debug]', inputs.image, inputs.swarm_template_env)
  ##[debug]Evaluating format:
  ##[debug]..Evaluating String:
  ##[debug]..=> 'IMAGE={0}
  ##[debug]{1}
  ##[debug]'
  ##[debug]..Evaluating Index:
  ##[debug]....Evaluating inputs:
  ##[debug]....=> Object
  ##[debug]....Evaluating String:
  ##[debug]....=> 'image'
  ##[debug]..=> 'ghcr.io/educorg/***:latest'
  ##[debug]..Evaluating Index:
  ##[debug]....Evaluating inputs:
  ##[debug]....=> Object
  ##[debug]....Evaluating String:
  ##[debug]....=> 'swarm_template_env'
  ##[debug]..=> 'PUBLISH_PORT=4504
  ##[debug]'
  ##[debug]=> 'IMAGE=ghcr.io/educorg/***:latest
  ##[debug]PUBLISH_PORT=4504
  ##[debug]
  ##[debug]'
  ##[debug]Result: 'IMAGE=ghcr.io/educorg/***:latest
  ##[debug]PUBLISH_PORT=4504
  ##[debug]
  ##[debug]'
  ##[debug]Loading env
Run kitconcept/docker-stack-deploy@v1.3.0
    with:
      registry: ghcr.io
      username: ***
      password: ***
      remote_host: ***
      remote_user: ***
      remote_port: 22
      remote_private_key: ***
      stack_file: ***
      stack_name: ***
      env_file: IMAGE=ghcr.io/educorg/***:latest
    PUBLISH_PORT=4504
    
    
      deploy_timeout: 600
      debug: 0
  ##[debug]Evaluating: inputs.registry
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'registry'
  ##[debug]=> 'ghcr.io'
  ##[debug]Result: 'ghcr.io'
  ##[debug]Evaluating: inputs.username
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'username'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.password
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'password'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.remote_host
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'remote_host'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.remote_port
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'remote_port'
  ##[debug]=> '22'
  ##[debug]Result: '22'
  ##[debug]Evaluating: inputs.remote_user
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'remote_user'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.remote_private_key
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'remote_private_key'
  ##[debug]=> '***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***'
  ##[debug]Result: '***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***
  ##[debug]***'
  ##[debug]Evaluating: inputs.deploy_timeout
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'deploy_timeout'
  ##[debug]=> '600'
  ##[debug]Result: '600'
  ##[debug]Evaluating: inputs.stack_file
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'stack_file'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.stack_name
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'stack_name'
  ##[debug]=> '***'
  ##[debug]Result: '***'
  ##[debug]Evaluating: inputs.stack_param
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'stack_param'
  ##[debug]=> ''
  ##[debug]Result: ''
  ##[debug]Evaluating: inputs.env_file
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'env_file'
  ##[debug]=> 'IMAGE=ghcr.io/educorg/***:latest
  ##[debug]PUBLISH_PORT=4504
  ##[debug]
  ##[debug]'
  ##[debug]Result: 'IMAGE=ghcr.io/educorg/***:latest
  ##[debug]PUBLISH_PORT=4504
  ##[debug]
  ##[debug]'
  ##[debug]Evaluating: inputs.debug
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'debug'
  ##[debug]=> '0'
  ##[debug]Result: '0'
  ##[debug]Evaluating: inputs.scale_after
  ##[debug]Evaluating Index:
  ##[debug]..Evaluating inputs:
  ##[debug]..=> Object
  ##[debug]..Evaluating String:
  ##[debug]..=> 'scale_after'
  ##[debug]=> ''
  ##[debug]Result: ''
  /usr/bin/docker run --name ghcriokitconceptdockerstackdeploy130_f98358 --label d628e2 --workdir /github/workspace --rm -e "INPUT_REGISTRY" -e "INPUT_USERNAME" -e "INPUT_PASSWORD" -e "INPUT_REMOTE_HOST" -e "INPUT_REMOTE_USER" -e "INPUT_REMOTE_PORT" -e "INPUT_REMOTE_PRIVATE_KEY" -e "INPUT_STACK_FILE" -e "INPUT_STACK_NAME" -e "INPUT_ENV_FILE" -e "INPUT_DEPLOY_TIMEOUT" -e "INPUT_STACK_PARAM" -e "INPUT_DEBUG" -e "INPUT_SCALE_AFTER" -e "REGISTRY" -e "USERNAME" -e "PASSWORD" -e "REMOTE_HOST" -e "REMOTE_PORT" -e "REMOTE_USER" -e "REMOTE_PRIVATE_KEY" -e "DEPLOY_TIMEOUT" -e "STACK_FILE" -e "STACK_NAME" -e "STACK_PARAM" -e "ENV_FILE" -e "DEBUG" -e "SCALE_AFTER" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_
  Environment Variables: Additional values
  Container Registry: Logged in ghcr.io as ***
  SSH client: Configured
  SSH client: Added private key
  SSH remote: Keys added to /root/.ssh/known_hosts
  ** WARNING: connection is not using a post-quantum key exchange algorithm.
  ** This session may be vulnerable to "store now, decrypt later" attacks.
  ** The server may need to be upgraded. See https://openssh.com/pq.html
  SSH connect: Success
  Since --detach=false was not specified, tasks will be created in the background.
  In a future release, --detach=false will become the default.
  Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.43
  Deploy: Failed to deploy *** from file ***
  ##[debug]Docker Action run completed with exit code 1
  ##[debug]Finished: Deploy

Because now v1.2.0 is worked, we can use it, without custom docker versions i think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants