4 ms·
"Docker itself is intentionally limited: when you start a container, you’re allowed to run only a single command, and that’s all. " - Not exactly true, you can
by _lex 13y ago
"Docker itself is intentionally limited: when you start a container, you’re allowed to run only a single command, and that’s all. "
- Not exactly true, you can launch a shell in that one command, in interactive mode, so you're then able to run as many commands in that shell as you'd like.
- joshstrange 13y agoDid you read the rest of the post? He goes on to say you can do that. In fact the entire message of the post is that entering into the container and running commands and then committing at end is more efficient (In the terms of numbers of layers and disk space, at the cost of what else I don't know yet) than using a Dockerfile and 'docker build'.
- mpasternacki 13y agoThe main cost is less clarity: the build steps aren't isolated anymore, so it's harder to pinpoint issues. There's also obvious risk of my script not interpreting all options correctly. Actually, I've just disabled VOLUME statement in the script, as it seems to be a no-op in Docker. Only trace it leaves in the image is setting image's command to '/bin/sh -c "#(nop) VOLUME [\"/data\"]"'.