Skip to content

Instantly share code, notes, and snippets.

@alfredorico
Created July 24, 2023 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredorico/ff448ac24e9a6ef4e52db175ccc6fc25 to your computer and use it in GitHub Desktop.
Save alfredorico/ff448ac24e9a6ef4e52db175ccc6fc25 to your computer and use it in GitHub Desktop.
Creating a new Vue app with docker command

In order to generate a new Vue app without any node installation in the host machine we can run the following command:

docker run --rm -v "${PWD}:/app" -w "/app" -it node:18-slim \
bash -c "npm create vue@3 && chown -R $(id -u):$(id -g) ."

Because I'm using Linux, I need to run the "chown" command to change the ownership from root (docker generated files are owned by root) to my local user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment