Created
March 17, 2020 20:03
-
-
Save ppiotrow/5354c285d70dc9ccb9c142592a02cb65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dockerLayerGrouping := { | |
val dockerBaseDirectory = (defaultLinuxInstallLocation in Docker).value | |
(path: String) => | |
{ | |
val pathInWorkdir = path.stripPrefix(dockerBaseDirectory) | |
if (pathInWorkdir.startsWith(s"/lib/${organization.value}")) | |
Some(2) | |
else if (pathInWorkdir.startsWith("/lib/")) | |
Some(1) | |
else if (pathInWorkdir.startsWith("/bin/")) | |
Some(1) | |
else None | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment