How to develop in a clean environment

2019-11-27 - How to develop in a clean environment Step 1: Make sure you have a recent version of Node.js installed. Haha, no. That is dumb, your software is trash, no thank you. Start by allowing your local folder to be mounted as a rw volume in docker: `sudo chcon -Rt svirt_sandbox_file_t $(pwd)` Then, use the docker user and volume crap to pull a fresh node image, and create yourself a dev environment: `docker run -it -v $(pwd):/home/node/$(basename $(pwd))/ --workdir /home/node/$(basename $(pwd)) --user 1000 node:latest bash` More than enough to get started: ``` $ docker run -it -v $(pwd):/home/node/$(basename $(pwd))/ --workdir /home/node/$(basename $(pwd)) --user 1000 node:latest bash node@bbf45634d85a:~/react-test$ yarn add react yarn add v1.19.1 warning package.json: No license field warning No license field [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... warning No license field warning Your current version of Yarn is out of date. The latest version is "1.19.2", while you're on "1.19.1". info To upgrade, run the following command: $ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash success Saved 1 new dependency. info Direct dependencies └─ react@16.12.0 info All dependencies └─ react@16.12.0 Done in 0.43s. node@bbf45634d85a:~/react-test$ ``` Yeah, fuck with my local system at your own peril, _bitch_.

← All writing