tailhook / vagga

Vagga is a containerization tool without daemons
http://vagga.readthedocs.org
MIT License
1.86k stars 96 forks source link

!NpmDependencies and !YarnDependencies are broken in bionic #500

Closed anxolerd closed 6 years ago

anxolerd commented 6 years ago

Description

!NpmDependencies and !YarnDependencies commands are broken when using !Ubuntu bionic.

Reproduction

Env

➜ cat /etc/fedora-release
Fedora release 28 (Twenty Eight)
➜ vagga -V
v0.8.0-153-g82a69c6
➜ uname -a
Linux anxolerd 4.17.6-200.fc28.x86_64 #1 SMP Wed Jul 11 20:29:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Minimal config

vagga.yaml

containers:
    base:
        setup:
            - !Ubuntu bionic
            - !NpmDependencies

package.json

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

Commands

vagga _build base

Actual result

Container build is failing with the following error:

Package nodejs-legacy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  nodejs

E: Package 'nodejs-legacy' has no installation candidate
ERROR 2018-07-20T16:33:45Z: vagga::builder: Error building container "base": step NpmDependencies { file: "package.json", package: true, dev: true, peer: false, bundled: true, optional: false } failed: error running <Command "/usr/bin/apt-get" "-oDir::cache::pkgcache=" "-oDir::cache::srcpkgcache=" "install" "-y" "build-essential" "ca-certificates" "nodejs" "nodejs-legacy" "nodejs-dev" "npm"; environ[6]; chroot="/vagga/root"; work-dir="/work"> exited with code 100
ERROR 2018-07-20T16:33:45Z: vagga::wrapper: Error executing _build: Builder exited with code 1
Command <Command "/proc/self/exe" "__wrapper__" "_build" "base"; environ[3]; uid_map=[UidMap { inside_uid: 0, outside_uid: 1000, count: 1 }, UidMap { inside_uid: 1, outside_uid: 100000, count: 65535 }]; gid_map=[GidMap { inside_gid: 0, outside_gid: 1000, count: 1 }, GidMap { inside_gid: 1, outside_gid: 100000, count: 65535 }]> exited with code 124

Expected result

Container is built successfully

Demo

asciicast

Workaround

I came up with the following workaround for now:

containers:
  base:
    setup:
    - !Ubuntu bionic
    - !UbuntuUniverse
    - !Install [nodejs, npm]
    - !NpmConfig
      install-node: false
    - !NpmDependencies