eugeneware / docker-wordpress-nginx

A Dockerfile that installs the latest wordpress, nginx and php-fpm.
MIT License
874 stars 380 forks source link

Wordpress tar.gz file is already unzipped #13

Closed mrtimuk closed 10 years ago

mrtimuk commented 10 years ago

On my Ubuntu machine, the line RUN tar xvzf /wordpress.tar.gz -C /usr/share/nginx fails with exit code 2.

On closer inspection, /wordpress.tar.gz is a directory. It seems like ADD http://wordpress.org/latest.tar.gz /wordpress.tar.gz has already unzipped it when it downloaded the file.

It would be good to put in check for this to skip the tar step if necessary. Just commenting out the tar command and changing the path for the ADD step fixes this on my machine.

To clarify, this works for me (but probably breaks for someone else!):

# Install Wordpress
ADD http://wordpress.org/latest.tar.gz /usr/share/nginx
RUN rm -rf /usr/share/nginx/www
RUN mv /usr/share/nginx/wordpress /usr/share/nginx/www
RUN chown -R www-data:www-data /usr/share/nginx/www
eugeneware commented 10 years ago

Thanks for this. Looks like docker change the semantics of their ADD command to unpack tarballs.

I'll updated the Dockerfile once I've done some testing, and republish to the index too.

Thanks for your help!