summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile35
-rw-r--r--docker/Dockerfile46
-rw-r--r--docker/docker-compose.yml2
3 files changed, 36 insertions, 47 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..0b18a4e81
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,35 @@
+FROM alpine:edge
+MAINTAINER Sebastian Rakel <sebastian@devunit.eu>
+
+RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing bash php5 py-pygments py2-pip imagemagick php5-gd nodejs composer php5-pdo_mysql php5-exif
+
+ENV FILEBIN_HOME_DIR /var/lib/filebin
+ENV FILEBIN_DIR $FILEBIN_HOME_DIR/filebin
+
+ADD . $FILEBIN_DIR
+
+RUN adduser -S -h $FILEBIN_HOME_DIR filebin
+RUN chown filebin: -R $FILEBIN_HOME_DIR
+
+RUN pip install ansi2html
+
+USER filebin
+
+ADD docker/filebin_starter.sh $FILEBIN_HOME_DIR
+ADD docker/add_user.sh $FILEBIN_HOME_DIR
+
+WORKDIR $FILEBIN_DIR
+
+RUN cp ./application/config/example/* ./application/config/
+RUN rm ./application/config/config-local.php
+
+RUN php ./check_deps.php
+
+WORKDIR $FILEBIN_HOME_DIR
+
+EXPOSE 8080
+
+VOLUME ["$FILEBIN_DIR/application/config", "$FILEBIN_DIR/data/uploads"]
+
+ENTRYPOINT ["bash", "-c"]
+CMD ["./filebin_starter.sh"]
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100644
index 8dd4e4e09..000000000
--- a/docker/Dockerfile
+++ /dev/null
@@ -1,46 +0,0 @@
-FROM ubuntu:14.04
-MAINTAINER Sebastian Rakel <sebastian@devunit.eu>
-
-ENV DEBIAN_FRONTEND noninteractive
-
-RUN apt-get update -y && \
- apt-get install -y php5 php5-mysql php5-gd php5-imagick expect \
- python-pygments imagemagick git python-pip realpath curl apt-transport-https
-
-RUN echo 'deb https://deb.nodesource.com/node_4.x trusty main' > /etc/apt/sources.list.d/nodesource.list
-RUN echo 'deb-src https://deb.nodesource.com/node_4.x trusty main' >> /etc/apt/sources.list.d/nodesource.list
-
-RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
-
-RUN apt-get update -y && \
- apt-get install -y nodejs
-
-RUN sudo pip install ansi2html
-
-ENV FILEBIN_HOME_DIR /var/lib/filebin
-ENV FILEBIN_DIR $FILEBIN_HOME_DIR/filebin
-
-RUN useradd -m -g users -d $FILEBIN_HOME_DIR filebin
-
-USER filebin
-
-ADD filebin_starter.sh $FILEBIN_HOME_DIR
-ADD add_user.sh $FILEBIN_HOME_DIR
-
-RUN git clone https://git.server-speed.net/users/flo/filebin/ $FILEBIN_DIR
-
-WORKDIR $FILEBIN_DIR
-
-RUN cp ./application/config/example/* ./application/config/
-RUN rm ./application/config/config-local.php
-
-RUN php ./install.php
-
-WORKDIR $FILEBIN_HOME_DIR
-
-EXPOSE 8080
-
-VOLUME ["$FILEBIN_DIR/application/config", "$FILEBIN_DIR/data/uploads"]
-
-ENTRYPOINT ["bash", "-c"]
-CMD ["./filebin_starter.sh"]
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 72efba67c..03bc37f59 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -12,7 +12,7 @@ services:
filebin:
links:
- mysql
- build: .
+ build: ..
ports:
- "8080:8080"
environment: