如何使用sbt docker plugin将软件包添加到docker容器?

时间:2018-08-10 13:02:59

标签: sbt

我尝试使用以下命令添加aws-cli软件包:dockerCommands += Cmd("RUN", "apk add aws-cli"),但收到以下消息:

[info ] ERROR: Unable to lock database: Permission denied  
[info ] ERROR: Failed to open apk database: Permission denied  
[info ] Removing intermediate container 9e3fae240d48 
[error] The command '/bin/sh -c apk add aws-cli' returned a non-zero code: 243

所以我尝试添加dockerExecCommand := Seq("docker exec --user=root"),但又收到另一条错误消息:

 java.io.IOException: Cannot run program "docker exec --user=root"

我在做什么错了?

0 个答案:

没有答案