[PR #591] [MERGED] use container image platform only on docker 1.41+ #1512

Closed
opened 2026-03-01 21:51:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/591
Author: @jaypipes
Created: 3/30/2021
Status: Merged
Merged: 3/30/2021
Merged by: @cplee

Base: masterHead: issue586


📝 Commits (1)

  • 9c15e50 use container image platform only on docker 1.41+

📊 Changes

5 files changed (+36 additions, -10 deletions)

View changed files

📝 README.md (+1 -1)
📝 cmd/root.go (+1 -1)
📝 go.mod (+1 -0)
📝 go.sum (+1 -0)
📝 pkg/container/docker_run.go (+32 -8)

📄 Description

Commit af5140f13e introduced support for
specifying a container image platform for cross-platform image building.

Unfortunately, attempting to execute a docker command that includes the
--platform flag against Docker daemons using API Version 1.40 and
before results in the following error:

"specify container image platform" requires API version 1.41, but the Docker daemon API version is 1.40

To allow act to be used on the 19.03 Docker CE and earlier versions,
this patch simply checks the Docker daemon API version and only
specifies platform specification when the daemon API version is 1.41 or
greater.

Fixes Issue #586


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/591 **Author:** [@jaypipes](https://github.com/jaypipes) **Created:** 3/30/2021 **Status:** ✅ Merged **Merged:** 3/30/2021 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `issue586` --- ### 📝 Commits (1) - [`9c15e50`](https://github.com/nektos/act/commit/9c15e5064b26bda460c9849cbf52b3121ec6b75b) use container image platform only on docker 1.41+ ### 📊 Changes **5 files changed** (+36 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `cmd/root.go` (+1 -1) 📝 `go.mod` (+1 -0) 📝 `go.sum` (+1 -0) 📝 `pkg/container/docker_run.go` (+32 -8) </details> ### 📄 Description Commit af5140f13e25a304cba8d3ac8646342440fc2ad6 introduced support for specifying a container image platform for cross-platform image building. Unfortunately, attempting to execute a docker command that includes the `--platform` flag against Docker daemons using API Version 1.40 and before results in the following error: ``` "specify container image platform" requires API version 1.41, but the Docker daemon API version is 1.40 ``` To allow `act` to be used on the 19.03 Docker CE and earlier versions, this patch simply checks the Docker daemon API version and only specifies platform specification when the daemon API version is 1.41 or greater. Fixes Issue #586 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:51:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1512
No description provided.