For more frequently asked questions (FAQ) see GitHub and Stackoverflow
Solution Set YII_ENV=dev
which is the variable responsible for the debug toolbar.
PHP Warning – yii\base\ErrorException
Cannot use a scalar value as an array
1. in /app/vendor/yiisoft/yii2/web/AssetManager.php
If you're experiencing slow updates, check what's going on in detail with
composer -vvv update
You need to use https://getcomposer.org/doc/articles/aliases.md, see also dmstr/yii2-cms-metapackage#1
ERROR: Cannot start container 88b754d7e46aca58961ef0a049216f0e7331e35ba905d84fab01016a4797a779: failed to create endpoint appdev_mariadb_1 on network bridge: Bind for 0.0.0.0:43306 failed: port is already allocated
Change your port mapping.
See also issue on GitHub
Solution Add the nameserver on your boot2docker
vm
echo "nameserver 8.8.8.8" > /etc/resolv.conf && sudo /etc/init.d/docker restart
env | sort
In most cases you won't be able to start images built FROM phundament/app:production
image, if you set YII_ENV=dev
, since development packages are missing on that image. It is also not recommended to use a production image in development mode.
See https://github.com/chadoe/docker-cleanup-volumes
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes
Pulling repository docker.io/phundament/php-one
ERROR: Service 'php' failed to build: Network timed out while trying to connect to https://index.docker.io/v1/repositories/phundament/php-one/images. You may want to check your internet connection or if you are behind a proxy.
make: *** [build] Error 1
Check your DNS settings, restart VM with docker-machine
.
Error description
docker@dev5:~$ tail -f /var/log/docker.log
[...]
time="2016-02-03T09:18:59.567541148Z" level=fatal msg="Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints"
Remove stale network files
docker@dev5:~$ sudo rm -rf /var/lib/docker/network/files
docker@dev5:~$ sudo /etc/init.d/docker restart
Need TLS certs for dev5,127.0.0.1,10.0.2.15,192.168.99.100
-------------------
docker@dev5:~$ docker ps
see https://github.com/chadoe/docker-cleanup-volumes
docker run \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
yelp/docker-custodian \
dcgc --max-image-age=30d --max-container-age=1d --dry-run
Interactive login
docker login tutum.co
Login docker CLI
docker login --username=dmstr --password=$TUTUM_PASS [email protected] tutum.co
Login docker-compose 1.2.0
docker login --username=dmstr --password=$TUTUM_PASS [email protected] https://tutum.co/v1
Note! Check if Docker saves the credentials locally.
Error:
FATA[0017] Error response from daemon: v1 ping attempt failed with error: Get https://registy.example.com/v1/_ping: dial tcp: lookup registy.example.com: no such host. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry registy.example.com` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/registy.example.com/ca.crt
Workaround: Add registry host to /etc/hosts
boot2docker ssh "echo '54.85.213.230 tutum.co' | sudo tee -a /etc/hosts"
boot2docker ssh "sudo /etc/init.d/docker restart"
Heads up! On some Docker-hosts, the
--insecure-registry
flag is not working as expected.
boot2docker ssh
Download private cert (docker >= 1.6)
sudo mkdir -m 755 -p /etc/docker/certs.d/registry.hrzg.de
curl -k https://git.hrzg.de/herzog/pub/raw/master/ssh/hrzg.de.crt > /etc/docker/certs.d/registry.hrzg.de/ca.crt
sudo mkdir -m 755 -p /var/lib/boot2docker/certs
curl http://curl.haxx.se/ca/cacert.pem > /var/lib/boot2docker/certs/ca.crt
Upddate daemon arguments
EXTRA_ARGS="--insecure-registry registry.hrzg.de --insecure-registry https://registry.hrzg.de/v1/ --registry-mirror=http://192.168.23.30:5555 --dns 192.168.23.17 --dns 8.8.4.4"
Restart docker
/etc/init.d/docker restart
In case of weird errors you have the following workaround options, which you should try from to bottom:
- Retry
- Run a clean-script from time to time.
- Use a different
COMPOSE_PROJECT_NAME
name for theCI
jobs. - Clean project build folder via NAS
- Clean project build folder via SSH to runner host and
docker exec -it runner-x bash
- Restart Docker daemon (
sudo service docker restart
anddocker start runner-a runner-b ...
- Move the project to another runner
- Create a new runner
- Reboot the runner-host (runners should have
restart=always
policy) - Recreate the runner-host (last resort)
$ bash build/scripts/deploy.sh
Username: EOF
Build variables like REGISTRY_USER
not set.
fatal: protocol error: bad line length character: No s
Check SSH key and correct spelling.
Todo: How to allow artifacts? ... cp to tmp and cp from tmp (EXPERIMENTAL!)