Public Repository

Last pushed: 6 months ago
Short Description
Docker-compose do WordPress + Mysql e Pure-FTPd
Full Description

docker-compose.yml

version: '2'
services:

wordpress:
image: wordpress:4.6.1-apache
ports:

 - 8082:80
volumes:
 - ./wp-content:/var/www/html/wp-content
links:
 - mysql
environment:
 WORDPRESS_DB_PASSWORD: wp

mysql:
image: mariadb:10.1.17
ports:

 - 8083:3306
volumes:
 - ./mysql:/var/lib/mysql
environment:
 MYSQL_ROOT_PASSWORD: wp

ftp:
image: brandaoandre3/pure-ftpd:1.0
ports:

- "21:21"

volumes:

- ./data/ftpuser:/home/ftpuser
- ./data/pure-ftpd:/etc/pure-ftpd

privileged: true

restart: always


Dockerfile

FROM debian:jessie
MAINTAINER Andre Brandao brandao_andre3@hotmail.com
RUN set -xe \
&& apt-get update \
&& apt-get install -y pure-ftpd \
&& rm -rf af /var/lib/apt/lists/* \
&& groupdadd ftpgroup \
&& useradd -g ftpgroup -m ftpuser

EXPOSE 21
VOLUME /home/ftpuser /etc/pure-ftpd

CMD ["pure-ftpd", "--login", "puredb:/etc/pure-ftpd/pureftpd.pdb", "--createhomedir"]


Imagens WordPress e MariaDB
Fonte:
http://www.mjph.ca/2017/02/11/installing-docker-compose-on-centos-7/

Imagem FTP
Fonte:
https: //hub.docker.com/r/vimagick/pure-ftpd/


Configurações extras para o FTP:
Após copiar o docker-compose.yml e o arquivo Dockerfile para uma pasta, execute os comandos abaixo:
SERVER
$ docker-compose up -d
$ docker-compose exec ftp bash

pure-pw useradd andre -u ftpuser -d /home/ftpuser/andre -t 1024 -T 1024 -y 1 -m
pure-pw list
pure-pw show andre
pure-pw passwd andre -m
pure-pw userdel andre -m
pure-ftpwho -n
exit

CLIENT
$ ftp "remote-server ou ip do host"
Name: andre
Password: andre
ftp> !touch file.txt
ftp> !ls
ftp> put file.txt
ftp> !rm file.txt
ftp> get file.txt
ftp> del file.txt
ftp> !ls
ftp> bye

Docker Pull Command
Owner
brandaoandre3