$ sudo -s
$ curl -Lo- "https://raw.githubusercontent.com/bpkg/bpkg/master/setup.sh" | bash
Symfony 2/3:
$ cd app
$ bpkg install lopezator/sfdocker
Symfony 4:
$ mkdir app
$ cd app
$ bpkg install lopezator/sfdocker
$ cd ..
$ ln -s app/deps/bin/sfdocker sfdocker
The first time you run ./sfdocker (with whatever arguments) if it doesn't detect the sfdocker.conf it will ask you to provide two parameters, default user and default container.
Note: if you provided wrong values and want to fix them, run:
$ ./sfdocker config
$ ./sfdocker start
$ ./sfdocker create
$ ./sfdocker remove
$ ./sfdocker stop
$ ./sfdocker restart
$ ./sfdocker build
$ ./sfdocker destroy
# Enter into the default container with the default user
$ ./sfdocker enter
# Enter into the default container (as privileged user, root):
$ ./sfdocker enter -p
# Enter into default container specifing an user:
$ ./sfdocker enter -u <user_name>
# Enter into other container with the default user
$ ./sfdocker enter <container_name>
# Enter into other container (as privileged user, root):
$ ./sfdocker enter <container_name> -p
# Enter into other container specifing an user:
$ ./sfdocker enter <container_name> -u <user_name>
$ ./sfdocker ps
# Show logs for the default container only:
$ ./sfdocker logs <-f>
# Show logs for all containers:
$ ./sfdocker logs all <-f>
# Show logs for the specified container:
$ ./sfdocker logs <container_name> <-f>
Note: All ./sfdocker logs commands accepts an optional LAST argument "-f" to simulate "tail -f" behaviour
$ ./sfdocker config
$ ./sfdocker self-update
$ ./sfdocker console <args>
$ ./sfdocker cache <dev/prod/test/all>
$ ./sfdocker ccode
Note: Only checks code added to git staging area (git add file).
$ ./sfdocker composer <args>
Note: Starts composer inside the container, so you can send any other composer parameter, if it's wrong, composer itself will return the error.
$ ./sfdocker gulp <args>
Note: Starts gulp inside the container, so you can send any other gulp parameter, if it's wrong, gulp itself will return the error.
$ ./sfdocker bower <args>
Note: Starts bower inside the container, so you can send any other bower parameter, if it's wrong, bower itself will return the error.
$ ./sfdocker mysql dump
$ ./sfdocker mysql restore
Note: Restores the latest file by modified date inside the "data/dumps" folder.
$ ./sfdocker mysql clear
$ ./sfdocker help