You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Figured it out: The trick is to use Cmd, not ExecCmd. Unlike ExecCmd, Cmd doesn't separate the binary and the parameters; it simply executes the entire thing as a single shell command. So if you add something like
According to https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ , one should always combine your apt-get update and apt-get install commands, e.g.
RUN apt-get update && apt-get install -y package-foo
Is there a way to do this when adding a run command? Not surprisingly,
ExecCmd("RUN", "apt-get", "update", "&&", "apt-get", "install", "-y", "package-foo")
...results in '&&' and subsequent items being treated as parameters for the apt-get binary, which obviously doesn't work.
The text was updated successfully, but these errors were encountered: