Quellcode durchsuchen

Add mozilla send Dockerfile

dennisro vor 7 Jahren
Ursprung
Commit
5a3fbef68b

+ 28 - 0
data/Dockerfiles/send/Dockerfile

@@ -0,0 +1,28 @@
+FROM node:8-alpine
+
+ARG SEND_VERSION=v2.5.4
+
+ENV UID=791 GID=791
+
+EXPOSE 1443
+
+COPY run.sh /usr/local/bin/run.sh
+COPY s6.d /etc/s6.d
+
+WORKDIR /send
+
+RUN set -xe \
+    && apk add --no-cache -U su-exec redis s6 \
+    && apk add --no-cache --virtual .build-deps wget tar ca-certificates openssl git \
+    && git clone https://github.com/mozilla/send.git . \
+    && git checkout tags/${SEND_VERSION} \
+    && npm install \
+    && npm run build \
+    && rm -rf node_modules \
+    && npm install --production \
+    && npm cache clean --force \
+    && rm -rf .git \
+    && apk del .build-deps \
+    && chmod +x -R /usr/local/bin/run.sh /etc/s6.d
+
+CMD ["run.sh"]

+ 34 - 0
data/Dockerfiles/send/README.md

@@ -0,0 +1,34 @@
+### Thanks to [https://github.com/nrobinaubertin/dockerfiles/tree/master/send](nrobinaubertin) for this Dockerfile. Original README below
+
+Send
+====
+*Simple, lightweight and secure Send container based on Alpine Linux*
+
+![send](send.jpg)
+
+### What is send ?
+[Send](https://send.firefox.com/) is a file sharing system by Mozilla that allows you to send files through a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever. You can find the official repository [here](https://github.com/mozilla/send).
+
+### Goal of this container
+Propose a lightweight and secure container that is easy to setup.
+
+### Features
+- Based on Alpine Linux.
+- No Root processes, as secure as possible.
+
+### Run-time variables
+- **UID**: (Optional) The UID executing the server
+- **GID**: (Optional) The GID executing the server
+
+### Ports
+- **1443**
+
+### Setup
+Example command to build this image:
+```
+docker build -t send .
+```
+Example command to run this container:
+```
+docker run --init -d -p 1443:1443 --name send send
+```

+ 5 - 0
data/Dockerfiles/send/run.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+
+export NODE_ENV=production
+chown -R "${UID}:${GID}" /send /etc/s6.d
+su-exec "${UID}:${GID}" /bin/s6-svscan /etc/s6.d

+ 2 - 0
data/Dockerfiles/send/s6.d/.s6-svscan/finish

@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 0

+ 2 - 0
data/Dockerfiles/send/s6.d/redis/run

@@ -0,0 +1,2 @@
+#!/bin/sh
+exec redis-server

+ 3 - 0
data/Dockerfiles/send/s6.d/send/run

@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /send
+exec npm run prod

BIN
data/Dockerfiles/send/send.jpg