使用Docker文件来构建WordPress图像 [英] Working on a Dockerfile in order to build a WordPress image
问题描述
FROM php:5.6-apache
然后,要安装我们必须使用的扩展和模型:
运行apt-get [安装或更新]
我的问题是:为什么我们使用 apt-get
如果我们没有在 FROM
中指定我们的图像是一个基于Debian的发行版?我可以使用yum吗?
WordPress图像Dockerfile 以 FROM php:5.6-apache
开头
但 php:5.6-apache
image Dockerfile 以 FROM debian:jessie
开头。
因此
每个图像都基于另一个基本图像构建。
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?
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.
这篇关于使用Docker文件来构建WordPress图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!