I come across some docker and found tianon/true
image that used in my docker file.
My docker-compose.yml file look like this :
app:
image: mageinferno/magento2-nginx:1.11-1
links:
- phpfpm
- db
volumes_from:
- appdata
ports:
- 8000:80
env_file: env/nginx.env
appdata:
image: tianon/true
volumes:
- /var/www/html
- ~/.composer:/var/www/.composer
- ./html/app/code:/home/gujarat/php/html/app/code
- ./html/app/design:/home/gujarat/php/html/app/design
- ./html/app/etc:/var/www/html/app/etc
- ./html/downloads:/var/www/html/downloads
phpfpm:
image: mageinferno/magento2-php:7.0-fpm-1
links:
- db
- mail
volumes_from:
- appdata
db:
image: percona:5.7
volumes_from:
- dbdata
ports:
- 8001:3306
env_file: env/mysql.env
dbdata:
image: tianon/true
volumes:
- /var/lib/mysql
setup:
image: mageinferno/magento2-php:7.0-fpm-1
command: /usr/local/bin/mage-setup
links:
- db
volumes_from:
- appdata
env_file: env/setup.env
What I don't understand is what is tiano/true is used for ?
From above setup this image is used appdata
I found this link on github but no readme at all on the first page.
Now I understand that every container needs an image.
In this case appdata
is a container that only pointing some directories and It will be used in another docker container.
appdata:
image: tianon/true # Here is the image, if we remove it, it won't work.
volumes:
- /var/www/html
- ~/.composer:/var/www/.composer
- ./html/app/code:/home/gujarat/php/html/app/code
- ./html/app/design:/home/gujarat/php/html/app/design
- ./html/app/etc:/var/www/html/app/etc
- ./html/downloads:/var/www/html/downloads
So in my docker-compose.yml
above it needs a docker image which is really small.And that is tianon/true
. It would be waste of resource if we choose another large docker image.
And I found in the short description in this link :
125 bytes total - nothing but "true" (perfect for volume-only containers) Yes, those are "regular bytes" - static assembly for the win.
so that's the tianon/true is used for. :D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With