docker-lamp | Apache MariaDB PHP 7 on Docker | Continuous Deployment library
kandi X-RAY | docker-lamp Summary
kandi X-RAY | docker-lamp Summary
Linux + Apache + MariaDB (MySQL) + PHP 7.2 on Docker Compose. Mod_rewrite enabled by default.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of docker-lamp
docker-lamp Key Features
docker-lamp Examples and Code Snippets
Community Discussions
Trending Discussions on docker-lamp
QUESTION
I've just started using docker by copy-pasting pre-made repos from github.
Here is the scenario and steps:
I've passed mysql/shell root password via environment variable -e and these passwords are set as expected inside entry.sh.
I then go inside container and reset shell/mysql root password to something different.
Now the main issue, each time I do docker stop + start from host, it resets passwords to the initial ones of step1.
Please suggest the changes so it retain the modified step2 passwords even I do docker start/stop.
Used entry.sh and dockerfile scripts can be checked from this github repo.
Thanks.
...ANSWER
Answered 2021-Feb-27 at 12:06I just noticed that the entry.sh
will always update the root password with $MYSQL_RANDOM_ROOT_PASSWORD
on docker start
. So assuming we already persist the /var/lib/mysql
in the host, we can edit the entry.sh
a bit to only update the password when /var/lib/mysql
doesn't exists:
QUESTION
So this is the image on GitHub that I wanted to push to my Docker Hub as an image.
I wanted to add a boostrap4 framework installation to the docker file.
...ANSWER
Answered 2020-Jan-02 at 06:48You need to write a dockerfile with the image you want as base image. Install bootstrap4 and build the image. Then you can push the new image to your docker hub.
Dockerfile might look something like this -
QUESTION
There are a few tutorials on the internet, some use docker-compose and therefore combine e.g. PHP, MariaDB, and PHPMyAdmin, all from the original projects on hub.docker.com. This method is pretty fast and easy to configure. With one yml file, the whole lamp server basically runs as required.
...ANSWER
Answered 2019-Feb-19 at 07:52According to the official documentation: "It is generally recommended that you separate areas of concern by using one service per container" which will be easier to maintain, scale or update without affecting any other services.
In docker these instances called
services
so the docker compose running each component as a service
Also you can read more about Running multi-service in container if you need to know more about it
Regarding the resource usage it wont waste as much as you think because this is one of the advantages when you compare a virtual machine to a docker container as it uses the same kernel of the host and does not dedicate a specific resources like what vms do as they run a whole separate operating system
QUESTION
I'm very new with Docker, and the most trouble I had with it, was to:
- Try to make my own image with basic LAMP (phpMyAdmin included)
- Using already created LAMP images (This one works for me but I'm having troubles with phpMyAdmin and privileges)
So I was asking myself if it would be possible to run multiple containers that connect between them (I saw there's the possibility to create a network on Docker but I don't know its limitations) and run as a single service like LAMP. In other words:
- Apache2 + PHP -> connected with container nº2 || Host connected through port forwarding.
- MySQL + PhpMyAdmin -> connected with container nº1
I'm still very confused by all the stuff you can or can't do with Docker.
...ANSWER
Answered 2018-May-05 at 19:42You need docker-compose - it allows to run many containers by one command: docker-compose up
.
You need to configure them, i.e. something like this: https://github.com/pnglabz/docker-compose-lamp.
QUESTION
I have a Docker image in dockerhub and this has been built several times because I need to update the PHP version to the newest. I need to use a previous version of that image and I think the way to go is by using the immutable identifier aka digest.
Here is the documentation in how to pull a given image by it's digest but I can't find a way to get all the digest from that image.
If you double click on a given build you obtain certain information like a build code, for example: berpxpunhmqe7bqh6lce5ub
but I don't think that is such digest.
How do I find that digest for a given build?
...ANSWER
Answered 2017-Nov-03 at 18:25Assuming you have a tag/identifier for the previous version and/or have a version in you local image cache, finding the digest to use with pull by digest can be done with a docker image inspect
as follows:
QUESTION
I have been trying to build a PHP cli container using Docker & Docker Compose and I want to keep it alive without the need to have any PHP script running inside it.
I have tried my own Dockerfile
:
ANSWER
Answered 2017-Oct-13 at 20:23You are running php -a
which is a REPL and it needs interactive TTY. So you need to enable those in your compose
QUESTION
I am trying to hold a container from start (ready to accept connection since it's Apache+PHP) before a dependency has finished. This is how my docker-compose.yml
looks like:
ANSWER
Answered 2017-Oct-01 at 15:07In your 'webserver' start-up script / entry point you could pass the sleep command or you could use: WAIT command as described here:
QUESTION
I am new to docker, using https://github.com/mattrayner/docker-lamp
I've read about the docker run
command but still not quite getting the -p
option. Is there a way to make it tell Apache to listen on a non-standard port?
I have succeeded in starting it on the default port 80, then re-configuring/re-loading Apache, from within the container, to bind itself to port 8080. But in that scenario I can't access the container's Apache from outside it via localhost:8080. (If that makes sense.)
I simply want to develop something using PHP 5.6 without disturbing anything else on my local setup, which is running PHP 7.0. If there's another way to achieve the same end, I'm good with that too.
...ANSWER
Answered 2017-Mar-27 at 18:09The -p
or --publish
option is a host:container
port mapping specifically so that you don't have to change what may already be running inside the container.
If the container is already running on port 80
but you want to access it externally (via your host or laptop) via port 8080
, then you can simple run with -p 8080:80
which will map your host port 8080
to the container port 80
.
Multiple containers can run and use port 80
on the same host (since the containers have their own IP address on the Docker network). But you can only expose one port at a time.
For example, if you had 3 containers you wanted to run and all of them were listening on port 80
, you could start the first with -p 8080:80
, the second with -p 8082:80
, and the third with -p 8084:80
.
The -p
section of https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose does into this a bit deeper.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install docker-lamp
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page