From 497d2dd559e626587ea146576eaf4ef4f492640b Mon Sep 17 00:00:00 2001
From: Thomas Sileghem
Date: Sun, 30 Apr 2017 14:35:14 +0100
Subject: [PATCH] chore(docker): add docker build
---
.dockerignore | 13 +++++++++++++
Dockerfile | 15 +++++++++++++++
readme.md | 9 +++++++--
3 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 .dockerignore
create mode 100644 Dockerfile
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..cea1a1b
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,13 @@
+/node_modules
+/public/storage
+/public/css
+/public/img
+/public/js
+/public/hot
+/storage/*.key
+/vendor
+Homestead.json
+Homestead.yaml
+.env
+/config/customRules.php
+mix-manifest.json
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..092a5fc
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,15 @@
+FROM node:7 as node
+FROM eboraas/laravel
+
+COPY --from=node /usr/local/bin/yarn /usr/local/bin/yarn
+COPY --from=node /usr/local/bin/node /usr/local/bin/node
+
+COPY ./ /var/www/laravel
+WORKDIR /var/www/laravel
+
+RUN composer install
+RUN php artisan kupo:init
+
+EXPOSE 8000
+
+CMD php artisan serve --host=0.0.0.0
diff --git a/readme.md b/readme.md
index 7747b4f..867cf7b 100644
--- a/readme.md
+++ b/readme.md
@@ -36,6 +36,13 @@ php artisan serve
// kupo should now have been started at http://localhost:8000/
```
+## Install using Docker
+
+```bash
+docker run -d -p 8000:8000 phanan/kupo
+// kupo should now have been started at http://localhost:8000/
+```
+
## Extend
Depending on your needs, you may want to add more rules into kupo. In order to do so, just follow these certain steps:
@@ -52,5 +59,3 @@ If you feel like a certain rule should be added, please contribute! Just fork an
## License
MIT © [Phan An](http://phanan.net)
-
-