docker
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| docker [2017/10/06 12:03] – ssm2017 | docker [2022/02/07 13:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 235: | Line 235: | ||
| Get containers containing the letter " | Get containers containing the letter " | ||
| <sxh bash> | <sxh bash> | ||
| + | ===== Get exposed ports ===== | ||
| + | <sxh bash> | ||
| ===== Docker one mysql instance ===== | ===== Docker one mysql instance ===== | ||
| Line 263: | Line 265: | ||
| The mysql server will be accessible from the outside on the port 6603. | The mysql server will be accessible from the outside on the port 6603. | ||
| + | == User Namespaces == | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | |||
| + | BEWARE IT CAN BREAK AN OLD DOCKER INSTALLATION !!! | ||
| + | |||
| + | <sxh bash> | ||
| + | groupadd -g 500000 dockremap && | ||
| + | groupadd -g 501000 dockremap-user && | ||
| + | useradd -u 500000 -g dockremap -s /bin/false dockremap && | ||
| + | useradd -u 501000 -g dockremap-user -s /bin/false dockremap-user | ||
| + | </ | ||
| + | <sxh bash> | ||
| + | echo " | ||
| + | echo " | ||
| + | </ | ||
| + | <sxh> | ||
| + | { | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | <sxh bash> | ||
| + | systemctl daemon-reload && systemctl restart docker | ||
| + | </ | ||
| + | == Portainer == | ||
| + | in normal mode : | ||
| + | <sxh bash> | ||
| + | docker run -d --privileged -p 9000:9000 -v / | ||
| + | </ | ||
| + | in usernamespace mode : | ||
| + | <sxh bash> | ||
| + | docker run -d --privileged --userns=host -p 9000:9000 -v / | ||
| + | </ | ||
| + | |||
| + | ===== php-fpm nginx with php extensions ===== | ||
| + | ./ | ||
| + | <sxh yml> | ||
| + | nginx: | ||
| + | image: nginx: | ||
| + | ports: | ||
| + | - " | ||
| + | volumes: | ||
| + | - ./ | ||
| + | - ./ | ||
| + | links: | ||
| + | - php | ||
| + | php: | ||
| + | build: ./ | ||
| + | volumes: | ||
| + | - ./ | ||
| + | </ | ||
| + | ./ | ||
| + | <sxh> | ||
| + | FROM php:7-fpm | ||
| + | RUN apt-get update && apt-get install -y --fix-missing | ||
| + | && docker-php-ext-install gd \ | ||
| + | && docker-php-ext-install mbstring \ | ||
| + | && docker-php-ext-enable gd \ | ||
| + | && docker-php-ext-enable mbstring | ||
| + | </ | ||
| {{tag> | {{tag> | ||
docker.1507284183.txt.gz · Last modified: (external edit)
