Docker: phpadmin as separate container to Apache2How is Docker different from a virtual machine?Should I use Vagrant or Docker for creating an isolated environment?How to list containers in DockerHow to get a Docker container's IP address from the host?How to remove old Docker containersHow to deal with persistent storage (e.g. databases) in DockerCopying files from Docker container to hostCopying files from host to Docker containerFrom inside of a Docker container, how do I connect to the localhost of the machine?When I use docker-compose deploy springcloud, Microservices that depend on the configuration center will restart indefinitely

Proof of work - lottery approach

How do we know the LHC results are robust?

How to write papers efficiently when English isn't my first language?

Balance Issues for a Custom Sorcerer Variant

What can we do to stop prior company from asking us questions?

Closest Prime Number

Purchasing a ticket for someone else in another country?

How easy is it to start Magic from scratch?

Where does the Z80 processor start executing from?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races

Sequence of Tenses: Translating the subjunctive

Implement the Thanos sorting algorithm

Are student evaluations of teaching assistants read by others in the faculty?

Was Spock the First Vulcan in Starfleet?

Increase performance creating Mandelbrot set in python

How many times can American Tourist re-enter UK in same 6 month period?

Go Pregnant or Go Home

How to safely derail a train during transit?

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

Do the temporary hit points from Reckless Abandon stack if I make multiple attacks on my turn?

when is out of tune ok?

CREATE opcode: what does it really do?

Escape a backup date in a file name

What Brexit proposals are on the table in the indicative votes on the 27th of March 2019?



Docker: phpadmin as separate container to Apache2


How is Docker different from a virtual machine?Should I use Vagrant or Docker for creating an isolated environment?How to list containers in DockerHow to get a Docker container's IP address from the host?How to remove old Docker containersHow to deal with persistent storage (e.g. databases) in DockerCopying files from Docker container to hostCopying files from host to Docker containerFrom inside of a Docker container, how do I connect to the localhost of the machine?When I use docker-compose deploy springcloud, Microservices that depend on the configuration center will restart indefinitely













0















I have separate containers for Apache2, PHP and mysql running on my system. Content files such as webcontent and databases are stored in mounted volumes on the host system. The idea here is that I can easily swap out individual containers when needed.



I want to add a phpmyadmin container to this setup, but I'm unsure how to link it in. Below is my compose file so far, with the phpmyadmin section at the bottom.



On a non Docker server I'd just create an alias in the Apache configuration to the installation folder, but how do I point Apache in this setup? Can I initialise the phpmyadmin container before the Apache container, and then mount a volume in the phpmyadmin container from Apache? Thereby getting me access to the files to be server?



Thanks.



version: '3.2'
volumes:
apache2Config:
external: true
webContent:
external: true
databases:
external: true

networks:
frontend:
backend:
ipam:
driver: default
config:
- subnet: 172.19.0.0/16

services:
php:
build:
context: './php7.1/'
args:
PHP_VERSION: $PHP_VERSION
image: php7.1.26-fpm:1.0
restart: always
container_name: php
networks:
backend:
ipv4_address: 172.19.1.2
volumes:
- webContent:/var/www
web:
build: ./apache2/
image: apache2:1.0
restart: always
container_name: AOW_apache2Server
depends_on:
- php
- mariadb
networks:
backend:
ipv4_address: 172.19.1.1
frontend:
expose:
- "80"
- "81"
- "443"
- "8083"
ports:
- "80:80/tcp"
- "81:81"
- "443:443"
- "8083:8083"
volumes:
- apache2Config:/mnt/apache2Conf
- webContent:/var/www
mariadb:
build: ./mariaDB/
image: mariadb_10.4.0
container_name: mariaDB_10.4.0
networks:
backend:
ipv4_address: 172.19.1.3
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=***
volumes:
- databases:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
depends_on:
- web
- mariadb
expose:
- 80
networks:
backend:
ipv4_address: 172.19.1.4
frontend:
ports:
- 8080:80
links:
- mariadb
environment:
PMA_ARBITRARY: 1
PMA_HOST: mariadb_10.4.0
PMA_PORT: 3306









share|improve this question






















  • I've abandoned the idea of doing it this way and instead just download and extract phpmyadmin files manually, and add them to the web content volume for mounting by the Apache container. Life is too short sometimes. :)

    – Ben
    Mar 22 at 9:09















0















I have separate containers for Apache2, PHP and mysql running on my system. Content files such as webcontent and databases are stored in mounted volumes on the host system. The idea here is that I can easily swap out individual containers when needed.



I want to add a phpmyadmin container to this setup, but I'm unsure how to link it in. Below is my compose file so far, with the phpmyadmin section at the bottom.



On a non Docker server I'd just create an alias in the Apache configuration to the installation folder, but how do I point Apache in this setup? Can I initialise the phpmyadmin container before the Apache container, and then mount a volume in the phpmyadmin container from Apache? Thereby getting me access to the files to be server?



Thanks.



version: '3.2'
volumes:
apache2Config:
external: true
webContent:
external: true
databases:
external: true

networks:
frontend:
backend:
ipam:
driver: default
config:
- subnet: 172.19.0.0/16

services:
php:
build:
context: './php7.1/'
args:
PHP_VERSION: $PHP_VERSION
image: php7.1.26-fpm:1.0
restart: always
container_name: php
networks:
backend:
ipv4_address: 172.19.1.2
volumes:
- webContent:/var/www
web:
build: ./apache2/
image: apache2:1.0
restart: always
container_name: AOW_apache2Server
depends_on:
- php
- mariadb
networks:
backend:
ipv4_address: 172.19.1.1
frontend:
expose:
- "80"
- "81"
- "443"
- "8083"
ports:
- "80:80/tcp"
- "81:81"
- "443:443"
- "8083:8083"
volumes:
- apache2Config:/mnt/apache2Conf
- webContent:/var/www
mariadb:
build: ./mariaDB/
image: mariadb_10.4.0
container_name: mariaDB_10.4.0
networks:
backend:
ipv4_address: 172.19.1.3
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=***
volumes:
- databases:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
depends_on:
- web
- mariadb
expose:
- 80
networks:
backend:
ipv4_address: 172.19.1.4
frontend:
ports:
- 8080:80
links:
- mariadb
environment:
PMA_ARBITRARY: 1
PMA_HOST: mariadb_10.4.0
PMA_PORT: 3306









share|improve this question






















  • I've abandoned the idea of doing it this way and instead just download and extract phpmyadmin files manually, and add them to the web content volume for mounting by the Apache container. Life is too short sometimes. :)

    – Ben
    Mar 22 at 9:09













0












0








0








I have separate containers for Apache2, PHP and mysql running on my system. Content files such as webcontent and databases are stored in mounted volumes on the host system. The idea here is that I can easily swap out individual containers when needed.



I want to add a phpmyadmin container to this setup, but I'm unsure how to link it in. Below is my compose file so far, with the phpmyadmin section at the bottom.



On a non Docker server I'd just create an alias in the Apache configuration to the installation folder, but how do I point Apache in this setup? Can I initialise the phpmyadmin container before the Apache container, and then mount a volume in the phpmyadmin container from Apache? Thereby getting me access to the files to be server?



Thanks.



version: '3.2'
volumes:
apache2Config:
external: true
webContent:
external: true
databases:
external: true

networks:
frontend:
backend:
ipam:
driver: default
config:
- subnet: 172.19.0.0/16

services:
php:
build:
context: './php7.1/'
args:
PHP_VERSION: $PHP_VERSION
image: php7.1.26-fpm:1.0
restart: always
container_name: php
networks:
backend:
ipv4_address: 172.19.1.2
volumes:
- webContent:/var/www
web:
build: ./apache2/
image: apache2:1.0
restart: always
container_name: AOW_apache2Server
depends_on:
- php
- mariadb
networks:
backend:
ipv4_address: 172.19.1.1
frontend:
expose:
- "80"
- "81"
- "443"
- "8083"
ports:
- "80:80/tcp"
- "81:81"
- "443:443"
- "8083:8083"
volumes:
- apache2Config:/mnt/apache2Conf
- webContent:/var/www
mariadb:
build: ./mariaDB/
image: mariadb_10.4.0
container_name: mariaDB_10.4.0
networks:
backend:
ipv4_address: 172.19.1.3
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=***
volumes:
- databases:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
depends_on:
- web
- mariadb
expose:
- 80
networks:
backend:
ipv4_address: 172.19.1.4
frontend:
ports:
- 8080:80
links:
- mariadb
environment:
PMA_ARBITRARY: 1
PMA_HOST: mariadb_10.4.0
PMA_PORT: 3306









share|improve this question














I have separate containers for Apache2, PHP and mysql running on my system. Content files such as webcontent and databases are stored in mounted volumes on the host system. The idea here is that I can easily swap out individual containers when needed.



I want to add a phpmyadmin container to this setup, but I'm unsure how to link it in. Below is my compose file so far, with the phpmyadmin section at the bottom.



On a non Docker server I'd just create an alias in the Apache configuration to the installation folder, but how do I point Apache in this setup? Can I initialise the phpmyadmin container before the Apache container, and then mount a volume in the phpmyadmin container from Apache? Thereby getting me access to the files to be server?



Thanks.



version: '3.2'
volumes:
apache2Config:
external: true
webContent:
external: true
databases:
external: true

networks:
frontend:
backend:
ipam:
driver: default
config:
- subnet: 172.19.0.0/16

services:
php:
build:
context: './php7.1/'
args:
PHP_VERSION: $PHP_VERSION
image: php7.1.26-fpm:1.0
restart: always
container_name: php
networks:
backend:
ipv4_address: 172.19.1.2
volumes:
- webContent:/var/www
web:
build: ./apache2/
image: apache2:1.0
restart: always
container_name: AOW_apache2Server
depends_on:
- php
- mariadb
networks:
backend:
ipv4_address: 172.19.1.1
frontend:
expose:
- "80"
- "81"
- "443"
- "8083"
ports:
- "80:80/tcp"
- "81:81"
- "443:443"
- "8083:8083"
volumes:
- apache2Config:/mnt/apache2Conf
- webContent:/var/www
mariadb:
build: ./mariaDB/
image: mariadb_10.4.0
container_name: mariaDB_10.4.0
networks:
backend:
ipv4_address: 172.19.1.3
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=***
volumes:
- databases:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
depends_on:
- web
- mariadb
expose:
- 80
networks:
backend:
ipv4_address: 172.19.1.4
frontend:
ports:
- 8080:80
links:
- mariadb
environment:
PMA_ARBITRARY: 1
PMA_HOST: mariadb_10.4.0
PMA_PORT: 3306






mysql docker phpmyadmin






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 21 at 15:54









BenBen

9212




9212












  • I've abandoned the idea of doing it this way and instead just download and extract phpmyadmin files manually, and add them to the web content volume for mounting by the Apache container. Life is too short sometimes. :)

    – Ben
    Mar 22 at 9:09

















  • I've abandoned the idea of doing it this way and instead just download and extract phpmyadmin files manually, and add them to the web content volume for mounting by the Apache container. Life is too short sometimes. :)

    – Ben
    Mar 22 at 9:09
















I've abandoned the idea of doing it this way and instead just download and extract phpmyadmin files manually, and add them to the web content volume for mounting by the Apache container. Life is too short sometimes. :)

– Ben
Mar 22 at 9:09





I've abandoned the idea of doing it this way and instead just download and extract phpmyadmin files manually, and add them to the web content volume for mounting by the Apache container. Life is too short sometimes. :)

– Ben
Mar 22 at 9:09












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55284433%2fdocker-phpadmin-as-separate-container-to-apache2%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55284433%2fdocker-phpadmin-as-separate-container-to-apache2%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript