Skip to content
Snippets Groups Projects
Select Git revision
  • cfb42551acb2d146ccfeb76c9831ac85072be048
  • main default protected
  • 101-on-server-restart-wordpress-spins-up-with-version-5-8-1-instead-of-the-latest-5-8-2
  • 81-git-sync
  • 50-random-cron-srct
  • orgsafe
  • 0.8.8
  • 0.8.7
  • 0.8.6
  • 0.8.5
  • 0.8.4
  • 0.8.3
  • 0.8.2
  • 0.8.1
  • 0.8.0
  • 0.6.21
  • 0.6.15
  • 0.6.2
  • 0.5.1
  • 0.5.0
  • 0.4.9
  • 0.4.4
  • 0.4.3
  • 0.4.2
  • 0.4.1
  • 0.4.0
26 results

Dockerfile

Blame
  • Dockerfile 929 B
    FROM wordpress:cli-2.5.0-php8.0
    
    USER root
    
    RUN apk add ansible git rsync openssh
    ADD . /var/local/ansible
    ENV ANSIBLE_CONFIG /var/local/ansible/ansible.cfg
    
    # This is the homedir of user 33 in the alpine container and needs to exist and
    # be writable for ssh to work.
    RUN mkdir -p /etc/X11/fs && chown -R 33:33 /etc/X11/fs
    
    # SSH Identity file location for backup playbook
    RUN mkdir -p /etc/ssh/ && echo "IdentityFile /var/local/ssh-private-key/ssh-private-key" > /etc/ssh/ssh_config
    
    # Chown the files to the Debian www-data user, because that's the only WP
    # container that runs Apache too.
    RUN chown -R 33:33 /var/local/ansible; \
        mkdir /etc/ansible; \
        echo 'localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3' > /etc/ansible/hosts
    
    WORKDIR /var/local/ansible
    
    # User 33 is www-data in the PHP container
    USER 33
    
    CMD ["ansible-playbook", "wpdeploy.yml", "-e", "@secrets/secret-vars.yaml"]