Skip to content
Advertisement

Docker Busybox container add groups and user

I need users in my docker containers. My build is from the busybox image which is missing groupadd, I tried to add it using apt-get but that’s also missing. What do I need to add to my Dockerfile to get groupadd?

So far I have

JavaScript

Advertisement

Answer

You’re trying to run Debian based command on a non-Debian system. If you need apt-get and other tools like that, you should change your base image with a FROM debian.

Busybox does include the addgroup with the following syntax:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement