To generate a react app using vite, just run the following command in a shell.
docker run --rm -it --user node -w /app -v ${PWD}:/app node:18-slim npm create vite
Then you might add the following Dockerfile.dev to the project:
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.
Run the following command to generate a new rails app without any ruby installation in the host machine. it just needs Docker.
export APP_NAME=myapp ; docker run --rm -v ${PWD}:/$APP_NAME -w /$APP_NAME -t ruby:slim \
sh -c "apt update && apt install -y --no-install-recommends git build-essential libpq-dev\
&& gem install -N rails -v '~>7' \
&& rails new $APP_NAME --database=postgresql --skip-system-test --skip-test \
&& chown -R $(id -u):$(id -g) $APP_NAME/"
This is an opinionated gist just to show that it's possible to start a ruby gem development work using Docker (I don't want any ruby installation in my manjaro laptop).
To generate a new gem in linux you can use the following command (if you're using MacOS there is no need to use --user
flag):
docker run --rm -it -w /app -v ${PWD}:/app ruby:slim bash -c "bundle gem newgem && chown -R $(id -u):$(id -g) ./newgem"
Then you can use the following Dockerfile to start the gem development work: