Mail archive
alpine-user

Re: [alpine-user] Docker add user pwd

From: Rainer Gerhards <rgerhards_at_hq.adiscon.com>
Date: Mon, 09 Apr 2018 14:47:37 +0000

The exec form of RUN does not invoke a shell itself, so neither the pipe
works nor the echo command. You need to add the sh as first parameters -
example (with bash) is in the quoted doc.

HTH
Rainer

Sent from phone, thus brief.

Cág <ca6c_at_bitmessage.ch> schrieb am Mo., 9. Apr. 2018, 16:40:

> Gabor Toth wrote:
>
> > #Add user
> >
> > RUN ["adduser","-D","-s","/bin/bash", "admin"]
> > #Set pwd for user
> >
> > #this is not working
> > RUN ["echo","admin:password","|", "chpasswd"]
>
> I am not an expert and have never used it, but the docs[0] show, that
> you should just "RUN adduser -D -s /bin/bash admin" and
> "RUN echo admin:password | chpasswd", i.e. no hard brackets.
>
> [0]: https://docs.docker.com/engine/reference/builder/
>
> --
> caóc
>
>
>
> ---
> Unsubscribe: alpine-user+unsubscribe_at_lists.alpinelinux.org
> Help: alpine-user+help_at_lists.alpinelinux.org
> ---
>
>



---
Unsubscribe:  alpine-user+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-user+help_at_lists.alpinelinux.org
---
Received on Mon Apr 09 2018 - 14:47:37 GMT