Mail archive
alpine-user

Re: [alpine-user] apk(1) error does not go away

From: Laurent Bercot <ska-devel_at_skarnet.org>
Date: Sun, 11 Feb 2018 00:09:06 +0000

>Oh, I see. So it's just because you don't like it. I thought there was
>some system-wide limitation or something on Alpine.

  It's not because someone doesn't like it. It's because it's an
inferior technical choice, teaching you to use non-standard constructs
in your scripts (reducing portability), consuming way more resources
than is necessary, and proven insecure in the past. We care about
quality of implementation, that's why we discourage you from using
bash. There's nothing more to it.

  Using bash makes sense in a few cases, namely when you need the extra
functionality that bash offers over a POSIX shell: for instance, arrays.
But those cases are pretty rare (and those bash scripts can generally
be advantageously replaced with small programs in a real programming
language - lua for instance). Most admin tasks can be achieved with
a POSIX shell, so it's good practice to code for sh, not for bash or
any other specific shell.

  There's no system-wide limitation on Alpine, but bash is not in base;
the default shell is ash, Busybox's /bin/sh, which is compatible with
bash in many ways, but not 100%. If you want to run bash scripts, you
need to apk add bash, which increases the size of your image.

  Of course, you're free not to care about any of this. But attention
to those details is generally why people choose Alpine over other
distributions, so you should expect those arguments to be given on
Alpine mailing-lists.

--
  Laurent
---
Unsubscribe:  alpine-user+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-user+help_at_lists.alpinelinux.org
---
Received on Sun Feb 11 2018 - 00:09:06 GMT