Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Hosting dathttpd on -
url: dat://b61c1b001bb2bc37ceda060895b5023b631dff09ce3486400fbcc2e8f4621951/
datOnly: false
url: dat://b61c1b001bb2bc37ceda060895b5023b631dff09ce3486400fbcc2e8f4621951/
datOnly: false
FROM ubuntu:16.04
RUN apt-get update --yes && apt-get upgrade --yes
RUN apt-get update --yes && apt-get upgrade --yes
RUN apt-get -y install curl
RUN curl -s | bash
RUN apt-get -y install ffmpeg zlib1g-dev automake autoconf git \
libtool subversion libatlas3-base python-pip \
python-dev wget unzip cowsay git-lfs \
libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev \
libpng-dev build-essential g++ vim
RUN apt-get clean
RUN curl | tar xJf - -C /opt
ENV PATH="/opt/node-v8.1.2-linux-x64/bin:${PATH}"
RUN curl -O
RUN python
RUN pip install awscli --ignore-installed six
RUN npm install -g json
ENV PATH="/usr/games:${PATH}"
RUN ln -s `which nodejs` /usr/bin/node
# Non-privileged user
RUN useradd -m dathttpd
# Copy files
WORKDIR /home/dathttpd
RUN chown -R dathttpd. .
# Change npm permissions
RUN chown -R dathttpd /opt/node-v8.1.2-linux-x64/lib/node_modules
RUN chown -R dathttpd /opt/node-v8.1.2-linux-x64/bin
RUN chown -R dathttpd /opt/node-v8.1.2-linux-x64/share
# Allow binding to ports 80 and 443 as a regular user
RUN setcap cap_net_bind_service=+ep /opt/node-v8.1.2-linux-x64/bin/node
# Unprivileged
USER dathttpd
RUN npm install -g dathttpd
COPY dathttpd.yml .dathttpd.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.