![]() ![]() ĭocker build -build-arg PHP_VERSION=7.4 -t=mattrayner/lamp:latest-2004-php7 -f. ĭocker build -build-arg PHP_VERSION=8.0 -t=mattrayner/lamp:latest-2004-php8 -f. Command Lineįirst, get the ID of your running container with docker ps, then run the below command replacing CONTAINER_ID and DATABASE_NAME with your required values:ĭocker build -build-arg PHP_VERSION=8.0 -t=mattrayner/lamp:latest -f. We recommend logging in with the admin user mentioned in the introduction to this section. So your application needs a database - you have two options.ĭocker-LAMP comes pre-installed with phpMyAdmin available from NOTE: you cannot use the root user with PHPMyAdmin. If you need this login later, you can run docker logs CONTAINER_ID and you should see it at the top of the log. This user can be used locally and externally, either by connecting to your MySQL port (default 3306) and using a tool like MySQL Workbench or Sequel Pro, or through phpMyAdmin. When you first run the image you'll see a message showing your admin user's password. It is not available from outside your docker image or through phpMyAdmin. This account is only available locally, i.e. Componentīy default, the image comes with a root MySQL account that has no password. The table below shows the different tags you can use, along with the PHP, MySQL and Apache versions that come with it. There are four main 'versions' of the docker image. NOTE: The 14.04 and 16.04 variants of this image are no longer being actively supported or updated. Although these images will stay on Docker Hub, we strongly recommend updating you applications to PHP 7 or PHP 8. NOTE: PHP 5.6 is end of life, so the PHP 5 images mattrayner/lamp:latest-1404-php5 and mattrayner/lamp:latest-1604-php5 will not receive any updates. You can move between all images without changing how you work with Docker. Having two entirely separate workflows didn't make any sense to me, and Docker-LAMP was born.ĭesigned to be a single interface that just 'gets out of your way', and works on 18.04 and 20.04 with php 7 and 8. To complicate things even further I needed an image, or actually two, that would run my applications on both 14.04 and 16.04. I searched in vein for an image that had everything I wanted, up-to-date packages, a simple interface, good documentation and active support.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |