summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <vincent@spotify.com>2014-08-22T16·35+0200
committerVincent Ambo <vincent@spotify.com>2014-08-22T16·35+0200
commit8d2fefec8fea73c680a5c7eb43bf73c0c33e9df0 (patch)
tree4e411cebbc0f54bbb3fe296ae902b4f5b48d5376
parent56609f1f59d84d78dfd1a897ee3e9d04768d3bab (diff)
Add Dockerfile & Makefile
-rw-r--r--Dockerfile.raw10
-rw-r--r--Makefile14
2 files changed, 24 insertions, 0 deletions
diff --git a/Dockerfile.raw b/Dockerfile.raw
new file mode 100644
index 000000000000..f67e3091dddc
--- /dev/null
+++ b/Dockerfile.raw
@@ -0,0 +1,10 @@
+FROM base/archlinux
+MAINTAINER Vincent Ambo <dev@tazj.in>
+
+COPY $ARCH_PKG /tmp/tazblog-current.pkg.tar.xz
+
+RUN pacman -U /tmp/tazblog-current.pkg.tar.xz --noconfirm
+
+VOLUME /var/tazblog
+EXPOSE 8000
+CMD /usr/bin/tazblog
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..14fd61ae30c3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+VERSION=$(shell bash -c "grep -P -o -e '\d\.\d$$' TazBlog.cabal | head -n1")
+ARCH_PKG=arch/tazblog-$(VERSION)-1-x86_64.pkg.tar.xz
+export ARCH_PKG
+
+all: archpkg docker
+
+archpkg: $(ARCH_PKG)
+
+$(ARCH_PKG):
+	cd arch && makepkg
+
+docker: archpkg
+	cat Dockerfile.raw | envsubst > Dockerfile; \
+	docker build -t tazjin/tazblog .