Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine template does not install extra package #1498

Closed
BegBlev opened this issue Apr 7, 2017 · 0 comments
Closed

Alpine template does not install extra package #1498

BegBlev opened this issue Apr 7, 2017 · 0 comments
Labels
Bug Confirmed to be a bug

Comments

@BegBlev
Copy link
Contributor

BegBlev commented Apr 7, 2017

When creating an Alpine container on some systems, extra packages are not installed.

For instance, on Ubuntu 16.04, the following command won't actually install squid package.

lxc-create -t alpine -n mycontainer -- squid

My understanding of the reason of this behavior is the following.
On Ubuntu, /bin/sh points to /bin/dash. With dash (POSIX shell), assigning "$@" to a variable is not working as with bash. Only the first element of the array is actually assigned.

However, in file lxc-alpine.in, line 267, such an assignment is done.

local packages="$@"

Actually, as install_packages function is called with exactly 2 arguments, I propose to replace the first 2 lines of this function

local arch="$1"; shift
local packages="$@"

by

local arch="$1"
local packages="$2"

I will submit a pull request very soon

Regards
Vincent

@brauner brauner added Bug Confirmed to be a bug Community labels Apr 7, 2017
stgraber added a commit that referenced this issue Apr 7, 2017
make Alpine template more POSIX shell friendly #1498
@brauner brauner closed this as completed Apr 8, 2017
stgraber pushed a commit that referenced this issue Apr 10, 2017
Signed-off-by: Vincent Catros <vincent.catros@laposte.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Development

No branches or pull requests

2 participants