Open spe888 opened 8 months ago
@spe888 can you export DEVBOX_DEBUG=1
prior to running devbox add
and then share the output? It'll print more information during the failure. This will help us diagnose the problem.
@savil Yes, here is the full output:
parsing and downloads finished in 28 ms
build_node starting jetpackio/devbox:latest (build)
build_node copied to docker volumes in 884 ms
build_node imported artifacts in 19 ms
build_node $ export DEVBOX_DEBUG=1
build_node $ devbox init
✓ Downloading version 0.7.1... [DONE]
✓ Verifying checksum... [DONE]
✓ Unpacking binary... [DONE]
build_node >
build_node > 2023/11/02 17:56:51 findProjectDir: path is
build_node > 2023/11/02 17:56:51 finding devbox.json in dir: /gcl-builds
build_node > 2023/11/02 17:56:51 failed to open devbox: No devbox.json found in this directory, or any parent directories. Did you run `devbox init` yet?
build_node > 2023/11/02 17:56:51 findProjectDir: path is
build_node > 2023/11/02 17:56:51 finding devbox.json in dir: /gcl-builds
build_node > 2023/11/02 17:56:51 failed to open devbox: No devbox.json found in this directory, or any parent directories. Did you run `devbox init` yet?
build_node > We detected extra packages you may need. To install them, run `devbox add nodejs`
build_node > 2023/11/02 17:56:51 findProjectDir: path is
build_node > 2023/11/02 17:56:51 finding devbox.json in dir: /gcl-builds
build_node $ devbox add awscli
build_node > 2023/11/02 17:56:52 findProjectDir: path is
build_node > 2023/11/02 17:56:52 finding devbox.json in dir: /gcl-builds
build_node > 2023/11/02 17:56:52 findProjectDir: path is
build_node > 2023/11/02 17:56:52 finding devbox.json in dir: /gcl-builds
build_node > 2023/11/02 17:56:52 findProjectDir: path is
build_node > 2023/11/02 17:56:52 finding devbox.json in dir: /gcl-builds
build_node > Info: Adding package "awscli@latest" to devbox.json
build_node >
build_node > Installing package: awscli@latest.
build_node >
build_node > [1/1] awscli@latest
build_node > 2023/11/02 17:56:53 running command: /home/devbox/.nix-profile/bin/nix profile install --profile /gcl-builds/.devbox/nix/profile/default --impure --priority 6 /nix/store/96aai5zsi2vbzihmp892nffpyz1nyjgy-awscli-1.29.9 --extra-experimental-features ca-derivations --option experimental-features nix-command flakes fetch-closure
build_node > warning: the group 'nixbld' specified in 'build-users-group' does not exist
build_node > these 40 paths will be fetched (59.77 MiB download, 311.04 MiB unpacked):
build_node > /nix/store/96aai5zsi2vbzihmp892nffpyz1nyjgy-awscli-1.29.9
build_node > /nix/store/5manmilmar3d8209ggbshm1hpg5ps9px-bash-5.2-p15
build_node > /nix/store/r3vfly4qcmhlznb890kvmjy9gcgwjiys-bzip2-1.0.8
build_node > /nix/store/yn8pgxiqsck15jiy57j5lw74naigkqg8-expat-2.5.0
build_node > /nix/store/6g3bglk85b40b32dmf2vp6asncgyblqa-gcc-12.3.0-lib
build_node > /nix/store/x5ghnj5rshkfsgkfy5yzk9acf72rf9s5-gcc-12.3.0-libgcc
build_node > /nix/store/nplzfjx3hya378pww34p480a551n673q-gdbm-1.23
build_node > /nix/store/c0hkzndf6i162jymxmlirn9l6ypv7p3c-glibc-2.38-23
build_node > /nix/store/q71xmnyqrp2jffvgam5q2rgq0rm1yhvr-groff-1.23.0
build_node > /nix/store/2yck6022i8lc1qnw4nlwc8iwajjz1hlz-less-643
build_node > /nix/store/y5qmn0dd2kz93ymw01byrva4wb5zwjih-libffi-3.4.4
build_node > /nix/store/2syab7xmdpiybx1zxa3xr1f69bd0c28h-libidn2-2.3.4
build_node > /nix/store/jdqaab4vz0fq41iyip2w60zj03lidlmd-libunistring-1.1
build_node > /nix/store/45307rq4fz0cy70f1s07wpy82rd8shy3-libxcrypt-4.4.36
build_node > /nix/store/ml8bb2n1i7wran1g9jr0licc0mc3xdd9-libyaml-0.2.5
build_node > /nix/store/q32zqjy1srffcwk79270dagfyi2r7fr9-mailcap-2.1.53
build_node > /nix/store/wfa6ml8hc8fqx0p6b8ljaafp00jwx63w-ncurses-6.4
build_node > /nix/store/1jp9cimzm3mfq3nn1nisyd9z7qhg1cad-openssl-3.0.11
build_node > /nix/store/dkrkq9a7hmnj366f1bs74nfivq7zfls1-pcre2-10.42
build_node > /nix/store/nxxghhhia9x1skpqfak4z407yy0mbnnd-python3-3.11.5
build_node > /nix/store/cw1b84b3a7nc93qixb05j6x37qw88lsn-python3.11-bcdoc-0.16.0
build_node > /nix/store/n23wci0ckdmjwx3aga06pprhvzrm8b3b-python3.11-botocore-1.31.48
build_node > /nix/store/w4061m6z7072f10aj7jaywdsqs71pgsn-python3.11-brotli-1.1.0
build_node > /nix/store/lb9g5smkgzscrks25a71zw7ji4jj2s13-python3.11-colorama-0.4.6
build_node > /nix/store/jwvs4qj4qpdvh3v14r18yvja62wkihg8-python3.11-docutils-0.20.1
build_node > /nix/store/81jqkch5dpxshrm64za5yvqh79amvrwv-python3.11-jmespath-1.0.1
build_node > /nix/store/6rlxz29qpdvrahmy6d8rj8apw6a6n4xv-python3.11-pyasn1-0.5.0
build_node > /nix/store/brnldlazvgsab718qhxmwmvn0dff34cm-python3.11-pysocks-1.7.1
build_node > /nix/store/fmxsn9gscvkb1dqwwhphc6hjg52bcdzx-python3.11-python-dateutil-2.8.2
build_node > /nix/store/xpd89cki4y76lmn4jw5w7hzkiqmaz4q4-python3.11-pyyaml-6.0.1
build_node > /nix/store/ykv3ncwv514j1wmf51mix56zwwva0xk1-python3.11-rsa-4.9
build_node > /nix/store/wr2zx5qklzxgqlbyrkjnq3kbz0bpkgl7-python3.11-s3transfer-0.6.2
build_node > /nix/store/gvsa2qpy0jwgn3kqfxqpfkz3xwg2c7n8-python3.11-six-1.16.0
build_node > /nix/store/zk1van5hvfgsdwciyqdgj87mignl65v2-python3.11-urllib3-2.0.5
build_node > /nix/store/aiqsc2i7nb5nsw7daa8kawwrcgkqanwl-readline-8.2p1
build_node > /nix/store/2y1vc61yg13rn7hfd0vvxlfr736cj7pk-sqlite-3.43.1
build_node > /nix/store/4py9nwcpayxv3qsm41ybplx42i89xz12-tzdata-2023c
build_node > /nix/store/8ryb54ica2wz5npwlcrld8cd3c3n87cb-xgcc-12.3.0-libgcc
build_node > /nix/store/0hdid26wdc42fwsqlhisf1z0wlfbfr4c-xz-5.4.4
build_node > /nix/store/i6w8i3ps7x9cyyyvfif55rf1plvprp2f-zlib-1.3
build_node > copying path '/nix/store/4py9nwcpayxv3qsm41ybplx42i89xz12-tzdata-2023c' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/q32zqjy1srffcwk79270dagfyi2r7fr9-mailcap-2.1.53' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/x5ghnj5rshkfsgkfy5yzk9acf72rf9s5-gcc-12.3.0-libgcc' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/8ryb54ica2wz5npwlcrld8cd3c3n87cb-xgcc-12.3.0-libgcc' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/jdqaab4vz0fq41iyip2w60zj03lidlmd-libunistring-1.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/2syab7xmdpiybx1zxa3xr1f69bd0c28h-libidn2-2.3.4' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/c0hkzndf6i162jymxmlirn9l6ypv7p3c-glibc-2.38-23' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/r3vfly4qcmhlznb890kvmjy9gcgwjiys-bzip2-1.0.8' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/5manmilmar3d8209ggbshm1hpg5ps9px-bash-5.2-p15' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/yn8pgxiqsck15jiy57j5lw74naigkqg8-expat-2.5.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/6g3bglk85b40b32dmf2vp6asncgyblqa-gcc-12.3.0-lib' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/nplzfjx3hya378pww34p480a551n673q-gdbm-1.23' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/y5qmn0dd2kz93ymw01byrva4wb5zwjih-libffi-3.4.4' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/45307rq4fz0cy70f1s07wpy82rd8shy3-libxcrypt-4.4.36' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/ml8bb2n1i7wran1g9jr0licc0mc3xdd9-libyaml-0.2.5' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/wfa6ml8hc8fqx0p6b8ljaafp00jwx63w-ncurses-6.4' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/1jp9cimzm3mfq3nn1nisyd9z7qhg1cad-openssl-3.0.11' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/dkrkq9a7hmnj366f1bs74nfivq7zfls1-pcre2-10.42' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/0hdid26wdc42fwsqlhisf1z0wlfbfr4c-xz-5.4.4' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/i6w8i3ps7x9cyyyvfif55rf1plvprp2f-zlib-1.3' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/2y1vc61yg13rn7hfd0vvxlfr736cj7pk-sqlite-3.43.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/2yck6022i8lc1qnw4nlwc8iwajjz1hlz-less-643' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/aiqsc2i7nb5nsw7daa8kawwrcgkqanwl-readline-8.2p1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/q71xmnyqrp2jffvgam5q2rgq0rm1yhvr-groff-1.23.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/nxxghhhia9x1skpqfak4z407yy0mbnnd-python3-3.11.5' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/cw1b84b3a7nc93qixb05j6x37qw88lsn-python3.11-bcdoc-0.16.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/lb9g5smkgzscrks25a71zw7ji4jj2s13-python3.11-colorama-0.4.6' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/w4061m6z7072f10aj7jaywdsqs71pgsn-python3.11-brotli-1.1.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/jwvs4qj4qpdvh3v14r18yvja62wkihg8-python3.11-docutils-0.20.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/81jqkch5dpxshrm64za5yvqh79amvrwv-python3.11-jmespath-1.0.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/6rlxz29qpdvrahmy6d8rj8apw6a6n4xv-python3.11-pyasn1-0.5.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/brnldlazvgsab718qhxmwmvn0dff34cm-python3.11-pysocks-1.7.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/xpd89cki4y76lmn4jw5w7hzkiqmaz4q4-python3.11-pyyaml-6.0.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/gvsa2qpy0jwgn3kqfxqpfkz3xwg2c7n8-python3.11-six-1.16.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/zk1van5hvfgsdwciyqdgj87mignl65v2-python3.11-urllib3-2.0.5' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/ykv3ncwv514j1wmf51mix56zwwva0xk1-python3.11-rsa-4.9' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/fmxsn9gscvkb1dqwwhphc6hjg52bcdzx-python3.11-python-dateutil-2.8.2' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/n23wci0ckdmjwx3aga06pprhvzrm8b3b-python3.11-botocore-1.31.48' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/wr2zx5qklzxgqlbyrkjnq3kbz0bpkgl7-python3.11-s3transfer-0.6.2' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/96aai5zsi2vbzihmp892nffpyz1nyjgy-awscli-1.29.9' from 'https://cache.nixos.org'...
build_node > [1/1] awscli@latest: Success
build_node > hint: Using 'master' as the name for the initial branch. This default branch name
build_node > hint: is subject to change. To configure the initial branch name to use in all
build_node > hint: of your new repositories, which will suppress this warning, call:
build_node > hint:
build_node > hint: git config --global init.defaultBranch <name>
build_node > hint:
build_node > hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
build_node > hint: 'development'. The just-created branch can be renamed via this command:
build_node > hint:
build_node > hint: git branch -m <name>
build_node > Initialized empty Git repository in /gcl-builds/.devbox/gen/flake/.git/
build_node > 2023/11/02 17:57:04 current environment PATH is: /home/devbox/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
build_node > 2023/11/02 17:57:04 Running print-dev-env cmd: /home/devbox/.nix-profile/bin/nix print-dev-env /gcl-builds/.devbox/gen/flake --extra-experimental-features ca-derivations --option experimental-features nix-command flakes fetch-closure --json
build_node > still running...
build_node > still running...
build_node > still running...
build_node >
build_node > Error: There was an error installing nix packages
build_node > source: Command: /home/devbox/.nix-profile/bin/nix print-dev-env /gcl-builds/.devbox/gen/flake --extra-experimental-features ca-derivations --option experimental-features nix-command flakes fetch-closure --json: exit status 1
build_node >
build_node > 2023/11/02 17:57:38 Command stderr: warning: the group 'nixbld' specified in 'build-users-group' does not exist
build_node > warning: Git tree '/gcl-builds/.devbox/gen/flake' is dirty
build_node > warning: creating lock file '/gcl-builds/.devbox/gen/flake/flake.lock'
build_node > warning: Git tree '/gcl-builds/.devbox/gen/flake' is dirty
build_node > copying path '/nix/store/a0rvd9lzbqf03r32f795sqkgzb5xjxfk-gnu-config-2021-01-25' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/gk6chaa2q2g96v85xs346yd4103g4zv9-libunistring-1.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/7h61k2sxzpnq6g010cklhifmrjhp4mmw-linux-headers-6.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/ihwys6xdv6pf5f2i9l283iqdkgy0k8a7-hook' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/fxsk8gz3w6f0x64r233yb5mm8cgfzb30-libidn2-2.3.2' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/hk72avjvcf83adwq16jz7y6kmx047w2h-glibc-2.35-224' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/w18m8wv10fiq0pncf55319gwn48nb9wl-attr-2.5.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/pr8nnx9w4njjsn63q44djc11a660mshh-bzip2-1.0.8' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/j66s3472n6p2lzc33w9jvjpr450lv31x-expand-response-params' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/a5jg4hg1r9qvjshn5il5b8bz0pllr5yr-ed-1.18' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/sc8jyzxrzkw4sq01fa9zbgj530prz2sy-bash-5.2-p15' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/x2jc94j700zn21mh7vdzcz7iz7zn91i0-gawk-5.2.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/grmhrrzkkh0pns34srqj8qyjg5kbcxcs-gcc-9.5.0-lib' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/0ypjjjg7961sf22i27ps74mcgizcxpnr-glibc-2.35-224-bin' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/88pgl82mjgb0s26i608rb6n58r8m55gr-gnumake-4.4' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/calvdm17c2j9zaa76jpba1ydz144syvh-gnused-4.9' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/2p70sa0jwkap6qb6ikgh16065ls0332k-gzip-1.12' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/3a4c9ra0ls58pkq0piyipzgn3pirwgrd-pcre-8.45' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/5i1b9gjq0gbn8mvp914xn8qq0nsvyznn-xz-5.4.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/y1phn6jpy5qrvd8ckd2vi15swrpz0fz4-zlib-1.2.13' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/hv3s5i4hs1zrq1wfmvvyfnvm5rrrmxaj-acl-2.3.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/6nnipba835jpsm2j59f8s6y3z294h43v-patch-2.7.6' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/x27r6fb1fgga1yjk26anv3b8xpf6vk3b-bzip2-1.0.8-bin' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/lxh7hrivn2xx0kg0g4s9d2sx9nwcvqk6-gnugrep-3.7' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/j62ph34nif4d6f4hw3pr91jyg1f7524h-gnutar-1.34' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/mrjml9a541fv3gg2g6n1rzili9yjsj44-file-5.43' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/dwr3w7v1wrk7i540sfslrmva6m9m0q4p-xz-5.4.0-bin' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/34zp9wjkf2b76zqwfnzvdbly8fasb9vk-glibc-2.35-224-dev' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/i8rnhjwfzjwvdkbhzyldi81jvraiz232-binutils-2.39' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/qck4rbskbzrkdrx3qp5i2b405j3hnprp-gmp-with-cxx-stage4-6.2.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/c204mh00yclrp74vz4jyqn7iqfs2npxx-patchelf-0.15.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/vpvk8r47396spnia2zddlz2iab18pcm5-gcc-9.5.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/vrwjy6f2fv8mzm689nlxrbvp3da96dhb-coreutils-9.1' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/g26vhm1jr64m60m199xjp1fgal8ljiqw-diffutils-3.8' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/53bav6j0svvc1n2368778kjg7f0pfyfa-findutils-4.9.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/a3ff76cjzb9zfhyiw3yqvnhnv0d9a35q-binutils-wrapper-2.39' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/1aaqc3ln9rb8nbbjrr8izwr3flb9aiql-gcc-wrapper-9.5.0' from 'https://cache.nixos.org'...
build_node > copying path '/nix/store/na08fg372691nspiyccwj8yjnxrblzr5-stdenv-linux' from 'https://cache.nixos.org'...
build_node > warning: the group 'nixbld' specified in 'build-users-group' does not exist
build_node > error: the group 'nixbld' specified in 'build-users-group' does not exist
build_node >
build_node > 2023/11/02 17:57:38
build_node > ExecutionID:3a83a65fb19245afbf796ab142528317
build_node > <nil>
build_node > 2023/11/02 17:57:38 findProjectDir: path is
build_node > 2023/11/02 17:57:38 finding devbox.json in dir: /gcl-builds
build_node finished in 52 s FAIL 1
FAIL build_node
> <nil>
> 2023/11/02 17:57:38 findProjectDir: path is
> 2023/11/02 17:57:38 finding devbox.json in dir: /gcl-builds
The error seems to be: error: the group 'nixbld' specified in 'build-users-group' does not exist
. This indicates that the nix-installation didn't work properly.
We'll look into it...
thanks @spe888 for reporting this. Savil and I looked into this yesterday and found 2 ways to workaround this:
FROM jetpackio/devbox-root-user
. But this image isn't supported in M1 macos (arm64) cpu architecture.devbox generate dockerfile
. If you run devbox generate dockerfile
in a your project directory (add --force
to override existing dockerfile), it adds a couple of permission statements that are important for your project to work. Besides copying the devbox.json and devbox.lock files into container, this dockerfile adds WORKDIR /code
and RUN sudo chown -R "${DEVBOX_USER}:${DEVBOX_USER}" /code
.
If you add those lines in your Dockerfile it should also be able to install awscli
or other packages. The variable ${DEVBOX_USER}
is just a user named devbox
we create when installing nix in the docker image. Since nix is installed in single-user mode and that user can't be root, we create a devbox
user and install nix under that name. Setting the owner of your project directory to the same devbox
user in the container sets the permissions correctly and allows nix to operate normally without throwing the errors you're seeing.Please let us know if this fixes your issue so that we can add these guidelines in our docs and dockerhub's description as well.
Current Behavior (bug) Docker Version: 24.0.6 OS: Sonoma 14.0 Macbook Pro (Apple M1 Pro)
Steps to reproduce:
Expected Behavior (fix) Simply installing devbox packages should work with the docker image of jetpackio.
Additional context devbox version: 0.7.1 contents of devbox.json: empty project (therefore: devbox init)