I'm creating environment for simple projects on php + apache and i'm new to docker. I don't get the difference between building something like alpine+LAMP or just build a LAMP, all machines running Ubuntu. Do i need an OS?
相关问题
- Docker task in Azure devops won't accept "$(pw
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
Yes. You need a OS(actually, it's not complete OS. i will explain later). Why? Ok, let me explain.
syscall
.Now the question is, where you application will get the necessary file system and libraries to run?
Here, the base OS(i.e. alpine image) come into play. This base image is not complete linux OS. It does not have a kernel. It provides a file system and some necessary libraries to run your application.
UPD: However, you can build a docker image that do not require any base OS image(from scratch). But it require that your application must be statically compiled which means it includes all necessary library within the binary that are required to run the application.