smebberson / docker-alpine

Docker containers running Alpine Linux and s6 for process management. Solid, reliable containers.
MIT License
596 stars 186 forks source link

su user -c fails #55

Closed matthewvalimaki closed 8 years ago

matthewvalimaki commented 8 years ago

Using smebberson/alpine-consul-base (latest) as base and then executing su build -c "" leads to I've also done apk upgrade --update which lead to BusyBox to upgrade busybox-1.24.2-r9.

So here's everything

/ # su build -c ""
halt: unrecognized option: c
BusyBox v1.24.2 (2016-06-23 08:49:16 GMT) multi-call binary.

Usage: halt [-d DELAY] [-n] [-f]

Halt the system

        -d SEC  Delay interval
        -n      Do not sync
        -f      Force (don't go through init)

I'm not quite sure if this is a smebberson/docker-alpine problem or problem with BusyBox. It didn't use to happen but now after using latest base images I'm getting this and cannot seem to resolve it.

matthewvalimaki commented 8 years ago

My bad. I was creating the user like so adduser -D -G build build and the default shell became /sbin/halt. Adding -s /bin/sh made that issue go away.