diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..cda6272ef26bd4a159e6d90ae3ef22ddbf481b2b
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,24 @@
+FROM docker.io/alpine
+COPY . /tmp/src
+RUN apk add --no-cache \
+      su-exec \
+ && apk add --no-cache \
+      -t build-deps \
+      go \
+      git \
+      musl-dev \
+ && cd /tmp/src \
+ && GOPATH=`pwd` go get github.com/constabulary/gb/... \
+ && PATH=$PATH:`pwd`/bin gb vendor restore \
+ && GOPATH=`pwd`:`pwd`/vendor go build -o bin/media_repo ./src/github.com/turt2live/matrix-media-repo/cmd/media_repo/ \
+ && GOPATH=`pwd`:`pwd`/vendor go build -o bin/import_synapse ./src/github.com/turt2live/matrix-media-repo/cmd/import_synapse/ \
+ && cp bin/media_repo bin/import_synapse docker/run.sh /usr/local/bin \
+ && cp config.sample.yaml /etc/media-repo.yaml.sample \
+ && cp -R migrations /var/lib/media-repo-migrations \
+ && cd / \
+ && rm -rf /tmp/* \
+ && apk del build-deps
+
+CMD /usr/local/bin/run.sh
+VOLUME ["/data", "/media"]
+EXPOSE 8000
diff --git a/docker/run.sh b/docker/run.sh
new file mode 100755
index 0000000000000000000000000000000000000000..40c60dfb4a1ae453722bcad653683a644c73f2f3
--- /dev/null
+++ b/docker/run.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env sh
+cd /data
+if [ ! -f media-repo.yaml ]; then
+    cp /etc/media-repo.yaml.sample media-repo.yaml
+fi
+chown -R ${UID}:${GID} /data
+
+exec su-exec ${UID}:${GID} media_repo -migrations /var/lib/media-repo-migrations