catthehacker / docker_images

Docker images
MIT License
213 stars 76 forks source link

Yarn missing from ghcr.io/catthehacker/ubuntu:js-x #39

Closed chasen-bettinger closed 2 years ago

chasen-bettinger commented 2 years ago

To reproduce:

ยป docker run -it ghcr.io/catthehacker/ubuntu:js-latest yarn --version                                                                                                                                                                                                         130 โ†ต
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "yarn": executable file not found in $PATH: unknown.

Issue first noticed while trying to use with act.

Here is my logs from doing so:

act
[Build/test    ] ๐Ÿš€  Start image=ghcr.io/catthehacker/ubuntu:js-latest
[Build/test    ]   ๐Ÿณ  docker pull image=ghcr.io/catthehacker/ubuntu:js-latest platform= username= forcePull=false
[Build/test    ]   ๐Ÿณ  docker create image=ghcr.io/catthehacker/ubuntu:js-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Build/test    ]   ๐Ÿณ  docker run image=ghcr.io/catthehacker/ubuntu:js-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Build/test    ]   ๐Ÿณ  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[Build/test    ]   ๐Ÿณ  docker cp src=project/. dst=project
[Build/test    ]   ๐Ÿณ  docker exec cmd=[mkdir -p project] user= workdir=
[Build/test    ] โญ  Run Setup Node
INFO[0070]   โ˜  git clone 'https://github.com/actions/setup-node' # ref=v2.5.0
[Build/test    ]   ๐Ÿณ  docker cp src=/Users/chasenbettinger/.cache/act/actions-setup-node@v2.5.0/ dst=/var/run/act/actions/actions-setup-node@v2.5.0/
[Build/test    ]   ๐Ÿณ  docker exec cmd=[mkdir -p /var/run/act/actions/actions-setup-node@v2.5.0/] user= workdir=
[Build/test    ]   ๐Ÿณ  docker exec cmd=[node /var/run/act/actions/actions-setup-node@v2.5.0/dist/setup/index.js] user= workdir=
[Build/test    ]   ๐Ÿ’ฌ  ::debug::isExplicit:
[Build/test    ]   ๐Ÿ’ฌ  ::debug::explicit? false
[Build/test    ]   ๐Ÿ’ฌ  ::debug::isExplicit: 10.24.1
[Build/test    ]   ๐Ÿ’ฌ  ::debug::explicit? true
[Build/test    ]   ๐Ÿ’ฌ  ::debug::isExplicit: 12.22.7
[Build/test    ]   ๐Ÿ’ฌ  ::debug::explicit? true
[Build/test    ]   ๐Ÿ’ฌ  ::debug::isExplicit: 14.18.2
[Build/test    ]   ๐Ÿ’ฌ  ::debug::explicit? true
[Build/test    ]   ๐Ÿ’ฌ  ::debug::evaluating 0 versions
[Build/test    ]   ๐Ÿ’ฌ  ::debug::match not found
| Attempting to download 14...
[Build/test    ]   ๐Ÿ’ฌ  ::debug::No manifest cached
[Build/test    ]   ๐Ÿ’ฌ  ::debug::Getting manifest from actions/node-versions@main
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.13.1 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.13.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.12.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.11.1 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.11.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.10.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.9.1 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.9.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.8.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.7.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.6.2 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.6.1 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.6.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.5.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.4.2 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.4.1 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.4.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.3.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.2.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.1.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 16.0.0 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::check 14.18.2 satisfies 14
[Build/test    ]   ๐Ÿ’ฌ  ::debug::x64===x64 && darwin===linux
[Build/test    ]   ๐Ÿ’ฌ  ::debug::x64===x64 && linux===linux
[Build/test    ]   ๐Ÿ’ฌ  ::debug::matched 14.18.2
| Acquiring 14.18.2 - x64 from https://github.com/actions/node-versions/releases/download/14.18.2-1525067507/node-14.18.2-linux-x64.tar.gz
[Build/test    ]   ๐Ÿ’ฌ  ::debug::Downloading https://github.com/actions/node-versions/releases/download/14.18.2-1525067507/node-14.18.2-linux-x64.tar.gz
[Build/test    ]   ๐Ÿ’ฌ  ::debug::Destination /tmp/c556b65a-3ccf-4dc9-802f-80e306bf7911
[Build/test    ]   ๐Ÿ’ฌ  ::debug::download complete
| Extracting ...
[Build/test    ]   ๐Ÿ’ฌ  ::debug::Checking tar --version
[Build/test    ]   ๐Ÿ’ฌ  ::debug::tar (GNU tar) 1.30%0ACopyright (C) 2017 Free Software Foundation, Inc.%0ALicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.%0AThis is free software: you are free to change and redistribute it.%0AThere is NO WARRANTY, to the extent permitted by law.%0A%0AWritten by John Gilmore and Jay Fenlason.
| [command]/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword -C /tmp/28f33487-b49c-4ec2-bd2e-9f3391a7fb50 -f /tmp/c556b65a-3ccf-4dc9-802f-80e306bf7911
| Adding to the cache ...
[Build/test    ]   ๐Ÿ’ฌ  ::debug::Caching tool node 14.18.2 x64
[Build/test    ]   ๐Ÿ’ฌ  ::debug::source dir: /tmp/28f33487-b49c-4ec2-bd2e-9f3391a7fb50
[Build/test    ]   ๐Ÿ’ฌ  ::debug::destination /opt/hostedtoolcache/node/14.18.2/x64
[Build/test    ]   ๐Ÿ’ฌ  ::debug::finished caching tool
| Done
[Build/test    ]   โ—  ::error::Unable to locate executable file: yarn. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
[Build/test    ]   โŒ  Failure - Setup Node
Sleepful commented 2 years ago

Using act -P ubuntu-latest=catthehacker/ubuntu:act-latest was giving me the same error. Using act -P ubuntu-latest=catthehacker/ubuntu:js-latest-dev solved it, per https://github.com/catthehacker/docker_images/issues/8#issuecomment-850501107

Sample log of error:

[Audit/Audit Project]   ๐Ÿ’ฌ  ::debug::Caching tool node 14.18.2 x64
[Audit/Audit Project]   ๐Ÿ’ฌ  ::debug::source dir: /tmp/b41be4d1-cc18-4e09-a0f1-b1db786fc559
[Audit/Audit Project]   ๐Ÿ’ฌ  ::debug::destination /opt/hostedtoolcache/node/14.18.2/x64
[Audit/Audit Project]   ๐Ÿ’ฌ  ::debug::finished caching tool
| Done
[Audit/Audit Project]   โ—  ::error::Unable to locate executable file: yarn. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
catthehacker commented 2 years ago

Yarn is available in images, trying to execute it directly in docker container will not work due to PATH being different