Jonathan Swisher
12/08/2023, 11:57 PMsudo npm install -g fleetctl successfully but then running sudo fleetctl preview results in:
2023/12/08 17:52:26 must use ASL logging (which requires CGO) if running as root
error getting credentials - err: exit status 1, out: ``
Error: Failed to run `docker-compose`
Has anyone run into this issue before?Jonathan Swisher
12/09/2023, 12:31 AM/Users/{username}/.fleet/preview and examined the docker-compose file. Everything looked good so I rand docker-compose pull and then docker-compose up -d and everything started successfully. However when I visited the demo url it prompted me to create a new user instead of using the default Email: <mailto:admin@example.com|admin@example.com> Password: preview1337#Colin Smith
12/09/2023, 1:45 PMdocker-compose command doesn't exist anymore and appears superseded by docker compose . I worked around the issue by installing the following script at /usr/bin/docker-compose (but would probably need to be installed at /usr/local/bin/docker-compose on macOS):
#!/bin/sh
docker compose "$@"Colin Smith
12/09/2023, 1:46 PMfleetctl preview should probably be updated to account for the removal of the docker-compose command.Jonathan Swisher
12/09/2023, 3:44 PMdocker-compose and docker compose commands work on my MacBook ProSimon van Dyk
12/12/2023, 6:02 PMnpm install -g fleetctl && fleetctl previewJonathan Swisher
12/13/2023, 4:30 PMsudo . Maybe I’ll try to remove everything and start again without using sudo and see what happens.Jonathan Swisher
12/13/2023, 8:51 PMsudo rm -rf /usr/local/{bin/{node,npm,npx},lib/node_modules/npm,lib/node,share/man/*/node.*}
I then installed via homebrew. After homebrew finished it wasn’t properly linked and running brew link node resulted in some errors. Running brew link --overwrite node returned a file/directory permission issue. I eded up changing permissions on the directories and ran the brew link --overwrite node command again repeating the process until brew successfully completed the link. Example command: `sudo chown -R `whoami`:admin /usr/local/include/node` which I pulled from https://stackoverflow.com/questions/31691626/cant-brew-install-node.
After this completed, I was finally able to run npm install -g fleetctl without any errors. (I may have needed to change ownership of another directory from root to my account). But, since I manually ran docker-compose earlier, docker desktop already had the images and had created volumes. So when I ran fleetctl preview it didn’t return an error but also didn’t launch the container.
Finally, I went into Docker Desktop and removed all containers, volumes, and images. Then re-ran npm install -g fleetctl (just to be safe) followed by fleetctl preview which now re-pulled the image and all the necessary dependencies for the preview environment.Simon van Dyk
12/15/2023, 1:40 PMasdf . I forgot to mention I did wipe out the ~/.fleet directory between my attempts as well.