Build with Docker or Podman
If you use Podman
replace docker
with podman
in the following commands.
Prepare the container
Go to CreamCSS
project's root directory and run:
docker pull docker.io/library/node:lts-alpine
docker create -it --name cream_builder -v "${PWD}":/app:Z -w /app node:lts-alpine /bin/ash
docker start -a -i cream_builder
In container execute:
npm install --save-dev clean-css
To exit from container use either:
exit
to stop the container and exitCtrl+P
thenCtrl+Q
to leave the container running
Use the container
If the container is stopped start it with:
docker start cream_builder
To build the minimized files execute:
docker exec -it cream_builder node build_CreamCSS.js
Update
If the container is stopped start it with:
docker start cream_builder
Get a shell in the container then update npm
and the packages:
docker exec -it cream_builder /bin/ash
npm install -g npm@latest
npm update
Cleanup
These are the commands to stop and remove the container and the downloaded image:
docker stop cream_builder
docker rm cream_builder
docker rmi node:lts-alpine