1.Dockerfiles编写
FROM centos:6.6
ENV CONF_INST /opt/atlassian/
ENV CONF_HOME /var/atlassian/application-data/
COPY ./confluence-5.4.4.tar.gz /confluence-5.4.4.tar.gz
COPY ./application-data-init.tar.gz /application-data-init.tar.gz
RUN set -x && yum install -y tar && mkdir -p ${CONF_INST} && tar -xvf /confluence-5.4.4.tar.gz --directory "${CONF_INST}/"
COPY ./startup.sh /startup.sh
RUN chmod +x /startup.sh
EXPOSE 8090
VOLUME ["${CONF_HOME}", "${CONF_INST}"]
CMD ["/startup.sh"]
2.docker-compose.yml的编写
version: '3.1'
services:
confluence:
image: wiki:1.0
restart: always
ports:
- 8090:8090
#entrypoint: bash -c "ping 127.0.0.1"
#command: bash -c "ping 127.0.0.1"
#command: /opt/atlassian/confluence/bin/catalina.sh run
volumes:
- /data/atlassian/confluence/logs:/opt/atlassian/confluence/logs
- /data/atlassian/confluence/logs:/opt/atlassian/application-data/confluence/logs
- /data/atlassian/application-data:/var/atlassian/application-data
- ./backups:/var/atlassian/application-data/confluence/backups
- ./restore:/var/atlassian/application-data/confluence/restore:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
build:
context: ./crack
dockerfile: Dockerfile