[SOLVED] Docker Image
Posted: Wed May 16, 2018 9:08 am
I'm new to wondercms and also new to docker, but am trying to write a docker file image to quickly get a wondercms instance up and running with minimal effort. So far i can see the homepage fine, but login does not work
In doing so i've created the dockerfile below and it's running through fine, but when i look at the site, the login url does not work. I've checked the .htaccess file is there and available.
GNU nano 2.8.0 File: dockerfile
#
# Super simple example of a Dockerfile
#
FROM ubuntu:latest
MAINTAINER Nick Brookes "my email address"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get clean -q
RUN apt-get update -q
RUN apt-get install -qy apt-utils
RUN apt-get install -qy dialog
RUN apt-get install -qy apache2
RUN apt-get install -qy libapache2-mod-php7.2
RUN apt-get install -qy nano
RUN apt-get install -qy git-core
RUN apt-get install -qy php
RUN apt-get install -qy php-curl
RUN apt-get install -qy php-mbstring
RUN apt-get install -qy php-zip
RUN apt-get install -qy curl
RUN a2enmod rewrite
RUN rm -r /var/www/html
RUN git config --global http.sslVerify false
RUN git clone https://github.com/robiso/wondercms.git /tmp/wondercms/
RUN cp -Rr /tmp/wondercms/ /var/www/html/
RUN chown -R www-data:www-data /var/www/html
RUN chmod -R 775 /var/www/html
#RUN chown www-data:www-data /var/www/html/database.js
#RUN chmod 775 /var/www/html/database.js
RUN ls -lah /var/www/html
RUN service apache2 restart
WORKDIR /var/www/html
# Start the service
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_SERVERNAME www.nearlyleftmyurlinhere.com
EXPOSE 80
RUN service apache2 restart
as you can see i'm installing all of the required modules (i think) but it's not working.
Any ideas?
it's running PHP 7.2 on ubuntu 18.04 with apache2, no customisation etc as i've not got that far yet!
Once this is running, happy for anyone to build on / tidy up the docker image and maybe more people will use wondercms if its simple to spin up an instance in docker.
- addition html directory listing
-rwxrwxr-x 1 www-data www-data 6 May 16 08:49 version
drwxrwxr-x 1 www-data www-data 4.0K May 16 08:49 themes
-rwxrwxr-x 1 www-data www-data 1.1K May 16 08:49 license
-rwxrwxr-x 1 www-data www-data 45K May 16 08:49 index.php
-rwxrwxr-x 1 www-data www-data 10K May 16 08:49 README.md
-rwxrwxr-x 1 www-data www-data 1.9K May 16 08:49 CONTRIBUTING.md
-rwxrwxr-x 1 www-data www-data 811 May 16 08:49 .htaccess-ultimate
-rwxrwxr-x 1 www-data www-data 208 May 16 08:49 .htaccess
-rwxrwxr-x 1 www-data www-data 63 May 16 08:49 .gitignore
drwxrwxr-x 1 www-data www-data 4.0K May 16 08:49 .git
drwxr-xr-x 1 root root 4.0K May 16 08:49 ..
drwxr-xr-x 2 www-data www-data 4.0K May 16 08:53 plugins
drwxr-xr-x 2 www-data www-data 4.0K May 16 08:53 files
-rw-r--r-- 1 www-data www-data 2.3K May 16 08:53 database.js
I know 775 isn't great, but i'm just debugging atm.
In doing so i've created the dockerfile below and it's running through fine, but when i look at the site, the login url does not work. I've checked the .htaccess file is there and available.
GNU nano 2.8.0 File: dockerfile
#
# Super simple example of a Dockerfile
#
FROM ubuntu:latest
MAINTAINER Nick Brookes "my email address"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get clean -q
RUN apt-get update -q
RUN apt-get install -qy apt-utils
RUN apt-get install -qy dialog
RUN apt-get install -qy apache2
RUN apt-get install -qy libapache2-mod-php7.2
RUN apt-get install -qy nano
RUN apt-get install -qy git-core
RUN apt-get install -qy php
RUN apt-get install -qy php-curl
RUN apt-get install -qy php-mbstring
RUN apt-get install -qy php-zip
RUN apt-get install -qy curl
RUN a2enmod rewrite
RUN rm -r /var/www/html
RUN git config --global http.sslVerify false
RUN git clone https://github.com/robiso/wondercms.git /tmp/wondercms/
RUN cp -Rr /tmp/wondercms/ /var/www/html/
RUN chown -R www-data:www-data /var/www/html
RUN chmod -R 775 /var/www/html
#RUN chown www-data:www-data /var/www/html/database.js
#RUN chmod 775 /var/www/html/database.js
RUN ls -lah /var/www/html
RUN service apache2 restart
WORKDIR /var/www/html
# Start the service
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_SERVERNAME www.nearlyleftmyurlinhere.com
EXPOSE 80
RUN service apache2 restart
as you can see i'm installing all of the required modules (i think) but it's not working.
Any ideas?
it's running PHP 7.2 on ubuntu 18.04 with apache2, no customisation etc as i've not got that far yet!
Once this is running, happy for anyone to build on / tidy up the docker image and maybe more people will use wondercms if its simple to spin up an instance in docker.
- addition html directory listing
-rwxrwxr-x 1 www-data www-data 6 May 16 08:49 version
drwxrwxr-x 1 www-data www-data 4.0K May 16 08:49 themes
-rwxrwxr-x 1 www-data www-data 1.1K May 16 08:49 license
-rwxrwxr-x 1 www-data www-data 45K May 16 08:49 index.php
-rwxrwxr-x 1 www-data www-data 10K May 16 08:49 README.md
-rwxrwxr-x 1 www-data www-data 1.9K May 16 08:49 CONTRIBUTING.md
-rwxrwxr-x 1 www-data www-data 811 May 16 08:49 .htaccess-ultimate
-rwxrwxr-x 1 www-data www-data 208 May 16 08:49 .htaccess
-rwxrwxr-x 1 www-data www-data 63 May 16 08:49 .gitignore
drwxrwxr-x 1 www-data www-data 4.0K May 16 08:49 .git
drwxr-xr-x 1 root root 4.0K May 16 08:49 ..
drwxr-xr-x 2 www-data www-data 4.0K May 16 08:53 plugins
drwxr-xr-x 2 www-data www-data 4.0K May 16 08:53 files
-rw-r--r-- 1 www-data www-data 2.3K May 16 08:53 database.js
I know 775 isn't great, but i'm just debugging atm.