-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 782 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM iconocoders/ubuntu-nginx
RUN rm -rf /var/www/html/*
COPY ./auth.json /root/.composer/auth.json
RUN composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition /var/www/html
RUN rm -f /etc/nginx/sites-enabled/default
COPY ./nginx.conf /etc/nginx/sites-enabled/default
WORKDIR /var/www/html
RUN chown -R www-data:www-data /var/www/html
RUN su www-data -c "cd /var/www/html && composer install"
RUN chmod -R 777 /var/www/html/pub/media /var/www/html/app/etc
# Add cron job
RUN apt-get -y install cron
ADD crontab /etc/cron.d/magento2-cron
RUN chmod 0644 /etc/cron.d/magento2-cron
RUN crontab -u www-data /etc/cron.d/magento2-cron
COPY ./bin/install-magento /var/www/html/install-magento
RUN /var/www/html/install-magento
EXPOSE 80