Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker image build not honoring API version #1294

Closed
thurstonsand opened this issue Dec 18, 2019 · 1 comment
Closed

docker image build not honoring API version #1294

thurstonsand opened this issue Dec 18, 2019 · 1 comment

Comments

@thurstonsand
Copy link

Expected behaviour

When running docker:publishLocal, it should honor docker's API version, not version, when determining compatibility.

Actual behaviour

docker:publishLocal improperly looks at version.

Information

  • sbt-native-packager version: 1.5.2
  • sbt version: 1.3.5
  • ubuntu 18.04
  • package: docker
  • target system: alpine

I am trying to use Github Actions to build my scala project's docker image. Due to reasons, they report a wildly different version number than CE edition (at time of writing, CE reports 19.03.5, Github Actions reports 3.0.8), but correctly report a recent API version number (at time of writing, both report 1.40)

as can be seen in this build, sbt-native-packager fails to build the docker image because it thinks docker cannot support multi-stage builds. But as can be seen in this later build, just hard-coding a recent version in the build.sbt causes the build to succeed.

while hard-coding the version works, it's not a very good workaround because it will require constant maintenance as API versions get updated. also, according to the github forums (linked above), Github's docker's maintainers have no plans to change their versions to match CE edition, because API version is supposed to serve as the compatibility check, so it will not be fixed upstream.

@muuki88
Copy link
Contributor

muuki88 commented Jan 20, 2020

Fixed in version 1.6.0

@muuki88 muuki88 closed this as completed Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants