What is the tianon / true used in the Dockerfile?
I came across some docker and found an tianon/true
image that was used in my docker file.
My docker-compose.yml file looks 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 tiano / true is used for? Set this image on topappdata
I found this link on github, but not all readme pages.
source to share
Now I understand that every container needs an image.
In this case appdata
, it is a container that only specifies some directories and 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 my docker-compose.yml
above needs a docker image which is really small. And this tianon/true
. It will be a waste of resources if we select another large docker file.
And I found in the short description in this link :
125 bytes in total - nothing but "true" (ideal for just size containers) Yes, these are "regular bytes" - a static build to win.
to use tianon / true .: D
source to share