- Setup
docker
anddocker-compose
- Run composer via command (in application directory):
sudo docker run --rm -it --dns=8.8.8.8 \
-v $(pwd)/:/app \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/group:/etc/group:ro \
-v /tmp/composer:/composer \
--user $(id -u):$(id -g) \
composer install --no-dev --ignore-platform-reqs --no-scripts
- Run
docker-compose -d up
- Visit http://silex-angular.lan
Global setup of the Vue CLI:
sudo docker run --rm -it --dns=8.8.8.8 \
-v $(pwd)/:/app \
-v $(pwd)/docker/node/node_modules:/usr/local/lib/node_modules \
node:7-alpine \
npm i -g vue-cli
Initialize Vue project (should be run only once)
sudo docker run --rm -it --dns=8.8.8.8 \
-v $(pwd)/:/app \
-v $(pwd)/docker/node/node_modules:/usr/local/lib/node_modules \
node:7-alpine \
sh -c 'cd /app && /usr/local/lib/node_modules/vue-cli/bin/vue init webpack-simple ./'
NPM install dependencies:
sudo docker run --rm -it --dns=8.8.8.8 \
-v $(pwd)/:/app \
-v $(pwd)/docker/node/node_modules:/usr/local/lib/node_modules \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/group:/etc/group:ro \
--user $(id -u):$(id -g) \
node:7-alpine /bin/bash -c 'cd /app && npm install'
OR Yarn install dependencies
sudo docker run --rm -it --dns=8.8.8.8 \
-v $(pwd)/:/app \
-v $(pwd)/docker/node/node_modules:/usr/local/lib/node_modules \
node:7-alpine \
sh -c 'cd /app && yarn install --no-bin-links'