Working on a Dockerfile in order to build a WordPress image

百般思念 提交于 2019-12-12 10:06:39

问题


I'm a newbie using Docker, and I don't understand something. If I'm using the official Dockerfile used to build the official Wordpress image, we start with:

FROM php:5.6-apache  

Then, to install extensions and models we have to use:

RUN apt-get [install or Update]  

My question is: Why we are using apt-get if we are not specifying in FROM that our image is a Debian based distro? Could I use yum?


回答1:


The WordPress image Dockerfile does begin with FROM php:5.6-apache.

But the php:5.6-apache image Dockerfile starts with FROM debian:jessie.
Hence the apt-get.

Each image builds up based on another base image.



来源:https://stackoverflow.com/questions/30016521/working-on-a-dockerfile-in-order-to-build-a-wordpress-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!