Browse Source

first commit

master
olig48 3 years ago
commit
3f25917465
  1. 1
      README.md
  2. 16
      mysql/docker-compose.yml
  3. 47
      nextcloud/docker-compose.yml
  4. 21
      python/Dockerfile
  5. 35
      smb/docker-compose.yml
  6. 10
      zfile/docker-compose.yml

1
README.md

@ -0,0 +1 @@
# my-docker

16
mysql/docker-compose.yml

@ -0,0 +1,16 @@
version: '3'
services:
db:
image: mysql
container_name: mysql # 容器名
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci #设置utf8字符集
restart: always
volumes:
- ./database:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=XXXX
- MYSQL_DATABASE=XXXXX
- MYSQL_USER=XXXXX
- MYSQL_PASSWORD=XXXXX
ports:
- 3306:3306

47
nextcloud/docker-compose.yml

@ -0,0 +1,47 @@
nextcloud:
image: nextcloud
container_name: nextcloud_web
links:
- nextcloud-db:nextcloud-db
environment:
- UID=1000
- GID=1000
- UPLOAD_MAX_SIZE=5G
- APC_SHM_SIZE=128M
- OPCACHE_MEM_SIZE=128
- CRON_PERIOD=15m
- TZ=Aisa/Shanghai
- ADMIN_USER=liucnt
- ADMIN_PASSWORD=6724130ltm
- DOMAIN=localhost
- DB_TYPE=mysql
- DB_NAME=nextcloud
- DB_USER=nextcloud
- DB_PASSWORD=6724130ltm
- DB_HOST=nextcloud-db
volumes:
# 文件会放在宿主机的 `/docker/nextcloud` 目录,如果不存在会自动创建
- /docker/nextcloud/data:/data
- /docker/nextcloud/config:/config
- /docker/nextcloud/apps:/apps2
- /docker/nextcloud/themes:/nextcloud/themes
- /ssd:/storage
expose:
- 80
ports:
# 宿主机端口:镜像端口
- 8080:80/tcp
restart: always
nextcloud-db:
image: mysql/mysql-server
container_name: nextcloud_db
volumes:
# 数据库文件会放在宿主机的 `/docker/nextcloud/db` 目录,如果不存在会自动创建
- /docker/nextcloud/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=6724130ltm
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=6724130ltm
restart: always

21
python/Dockerfile

@ -0,0 +1,21 @@
FROM python:3.7-alpine
COPY ./xxx /xxx
WORKDIR /xxx
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.cloud.tencent.com/g' /etc/apk/repositories \
&& apk add tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo 'Asia/Shanghai' >/etc/timezone \
&& pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple \
&& apk add --no-cache --virtual .build-deps gcc libc-dev libxslt-dev \
&& apk add --no-cache libxslt \
&& python -m pip install --upgrade pip \
&& pip install -r requirements.txt \
&& apk del .build-deps tzdata
VOLUME ["/xxx"]
CMD ["python","-u","main.py","timing"]

35
smb/docker-compose.yml

@ -0,0 +1,35 @@
version: '3.1'
services:
samba:
image: dperson/samba:latest
container_name: samba
restart: always
network_mode: 'host'
volumes:
- /media:/mount
environment:
TZ: 'Asia/Shanghai'
USER: 'liu;123123'
SHARE: 'share;/mount/;yes;no;no;all;none'
logging:
driver: "json-file"
options:
max-size: "1m"
minidlna:
image: vladgh/minidlna
container_name: minidlna
restart: always
network_mode: 'host'
environment:
- MINIDLNA_MEDIA_DIR=/media
- MINIDLNA_FRIENDLY_NAME=MiniDLNA
- MINIDLNA_INOTIFY=yes
- MINIDLNA_NOTIFY_INTERVAL=3
volumes:
- /root/cache/minidlna:/var/lib/minidlna
- /media:/media
logging:
driver: "json-file"
options:
max-size: "1m"

10
zfile/docker-compose.yml

@ -0,0 +1,10 @@
version: '3'
services:
zfile:
image: olig48/zfile:my
container_name: zfile
restart: always
volumes:
- ./.zfile:/root/.zfile
ports:
- 8080:8080
Loading…
Cancel
Save