X-Original-To: alpine-user@lists.alpinelinux.org Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) by lists.alpinelinux.org (Postfix) with ESMTP id 787CD5C4990 for ; Mon, 9 Apr 2018 14:47:49 +0000 (GMT) Received: by mail-io0-f177.google.com with SMTP id d6so9921188iog.1 for ; Mon, 09 Apr 2018 07:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hq-adiscon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Msa59ipZaKhsV31xKtWh9QOM2llrBr3HhTjLd3hGtbs=; b=GnW7eULPokMh4mPQtTq96EN3Zsr0eN9a1r++Di0Gp6ps8kg94KVUoJS8MVCiOGgJN+ y4eqZyTcbarWPaggAtrMJQ+Ba9k4KGMp3jdXabnRDK4qy3uS1SHEUXLLDKwFQsYVDuk0 MkZ9WyPYBj80o3SqKo6QE112AZq2h7kYu7c+1rseVMh0vUaCJ37+7P92ZfwD9Jxqn1K9 tzp/xykmVxwP3BqHFEQqocsKtmYf8M/BKPoc8ciGTzZe+vPFdpEcCDv7mmu3PgOz9DCo NPy8ngdE3ITf5PKmzzdvT4gTy/MDtOn4oFfMJwXdaQrFnANsGRXrQziBU+sTwXcBcWk/ oqPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Msa59ipZaKhsV31xKtWh9QOM2llrBr3HhTjLd3hGtbs=; b=bplAmDoAmB/fAiGiMKQcDuSj8RB36SWvldBTUbue2xhKzIsqqOXi2CcltuD6zfAOyt mNSXWaGx5e5bvdeWm3Wz9uBFXzTAUsJ9f8uSfCOrLcSwY12nBzo5qzCSyig89G48gVJ+ dPo7sJjBQYR6RT+PGqkWxhbMI2B4G1cQSy391/Yeh+dud0DHyAD7LBRFY0fZxEcRRGwI 2SmJmz9V5M0HiVKrAjlyWwHuqCRUZgrvP7fckg7obByCj+sCkRiakWxbDgOsXa4kaiJI 4dWI+sV3mV9jiHeqekm0GmdzxccWsXuMqDuGTRBIv7PW3ETccZUPOrIeh/pq5A86R8Oa 3W6Q== X-Gm-Message-State: ALQs6tARQYn2/16zxPU3n9U6JQmM8kD6NH7mcg+nlogqOnN9xRVjGdOz U+HFVPu/zNgrlVArE2rBVcHcIb0L5csU5FxykvbEDnLH X-Google-Smtp-Source: AIpwx481DR+MmZ8i4hSzDKNi/vRYYah7Onvj/VtURhcirLyVfL+eUoVqPx6Hu/Y/4ceKH0Cu9LokwU3xebl4cO8ZYyg= X-Received: by 10.107.68.4 with SMTP id r4mr36387879ioa.161.1523285268632; Mon, 09 Apr 2018 07:47:48 -0700 (PDT) X-Mailinglist: alpine-user Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 References: <20180409143913.GA27510@alpine.my.domain> In-Reply-To: <20180409143913.GA27510@alpine.my.domain> From: Rainer Gerhards Date: Mon, 09 Apr 2018 14:47:37 +0000 Message-ID: Subject: Re: [alpine-user] Docker add user pwd To: =?UTF-8?B?Q8OhZw==?= Cc: alpine-user@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="089e0825e388543aa305696b7da9" --089e0825e388543aa305696b7da9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=A1g 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=C3=B3c > > > > --- > Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org > Help: alpine-user+help@lists.alpinelinux.org > --- > > --089e0825e388543aa305696b7da9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The exec form of R= UN does not invoke a shell itself, so neither the pipe works nor the echo c= ommand. You need to add the sh as first parameters - example (with bash) is= in the quoted doc.

HTH
Rainer

Sent from phone, thus brief.

<= div class=3D"gmail_quote">
C=C3=A1g <ca6c@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/refe= rence/builder/

--
ca=C3=B3c



---
Unsubscribe:=C2=A0 alpine-user+unsubscribe@lis= ts.alpinelinux.org
Help:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0alpine-user+he= lp@lists.alpinelinux.org
---

--089e0825e388543aa305696b7da9-- --- Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org Help: alpine-user+help@lists.alpinelinux.org ---