-
Notifications
You must be signed in to change notification settings - Fork 441
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
chown values overrides for Docker format #1400
base: main
Are you sure you want to change the base?
Conversation
Hi @arixmkii, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @arixmkii for your contributions ❤️
I suggested a few changes. If possible it would be nice to have a sbt scripted test that show's this feature in action.
val chownUser = | ||
SettingKey[Option[String]]("chown-user", "Optional alternative user to use in chown in COPY command") | ||
val chownGroup = | ||
SettingKey[Option[String]]("chown-group", "Optional alternative group to use in chown in COPY command") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val chownUser = | |
SettingKey[Option[String]]("chown-user", "Optional alternative user to use in chown in COPY command") | |
val chownGroup = | |
SettingKey[Option[String]]("chown-group", "Optional alternative group to use in chown in COPY command") | |
val dockerChownUser = | |
SettingKey[Option[String]]("docker-chown-user", "Optional alternative user to use in chown in COPY command") | |
val dockerChownGroup = | |
SettingKey[Option[String]]("docker-chown-group", "Optional alternative group to use in chown in COPY command") |
If the setting is specific to a packaging format it's prefixed with that format. In this case docker<SettingKey>
. The configuration scoping is not necessary, so you can move it in the plugins definition to the other settings starting with docker.
@@ -99,6 +99,12 @@ Environment Settings | |||
``daemonUser in Docker`` | |||
The user to use when executing the application. Files below the install path also have their ownership set to this user. | |||
|
|||
``chownUser in Docker`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``chownUser in Docker`` | |
``dockerChownUser`` |
``chownUser in Docker`` | ||
Optionally overrides user value used for applying to ``chown`` in ``COPY`` commands. | ||
|
||
``chownGroup in Docker`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``chownGroup in Docker`` | |
``dockerChownGroup`` |
chownUser := None, | ||
chownGroup := None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chownUser := None, | |
chownGroup := None, | |
dockerChownUser := None, | |
dockerChownGroup := None, |
See comment in the Keys.scala
.
Also move up to the settings starting with docker*
@muuki88 Thank you for detailed feedback! I will update this PR on Thursday. |
Looking forward 🐱 |
Fixes #1399
SettingKeys are added under Docker specific trait. I also added basic documentation about them being available.