Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker integration #12

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM php:7.2-apache
RUN apt-get update \
&& apt-get install imagemagick -y \
&& rm -rf /var/lib/apt/lists/*
COPY . /var/www/html
EXPOSE 80
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ Generate custom Rubik's cube visualisations from your browser address bar.
These instructions are for installing the script on your own web server. If you do not have access to your own server, or would just like to try out the software, please visit:
http://cube.crider.co.uk/visualcube.php

##### Docker integration

If you want to run VisualCube locally or on the server but you don't want to install PHP, is a good idea to deploy app as a Docker container.
To build your own Docker image run from the root of the repository:
```sh
$ docker build -t visual-cube .
```

And then create a container locally with exposed port 80 (for HTTP):
```sh
$ docker run --rm -p 80:80 visual-cube
```

Go to address `http://localhost/visualcube.php` in your browser.

##### Prerequisites

* Access to an Apache web server with PHP and ImageMagic installed.
Expand Down