From 254d6d6d388a64cc54b1b5c4118c424d3c2256a0 Mon Sep 17 00:00:00 2001 From: sneak Date: Sun, 22 Mar 2020 01:46:01 -0700 Subject: [PATCH] add build scripts, probably broken --- .drone.yml | 19 +++++++++++++++++++ Dockerfile | 40 ++++++++++++++++++++++++++++++++++++++++ Makefile | 6 ++++++ README.md | 4 ++++ 4 files changed, 69 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 Makefile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..738d965 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,19 @@ +kind: pipeline +name: default + +steps: +- name: docker + image: plugins/docker + network_mode: bridge + settings: + repo: sneak/adchpp + build_args: + - UBUNTU_MIRROR=http://ubuntu.datavi.be/ubuntu + username: + from_secret: docker_username + password: + from_secret: docker_password + tags: + - ${DRONE_BRANCH//\//-}-${DRONE_COMMIT_SHA:0:8} + - ${DRONE_COMMIT_SHA} + - ${DRONE_BRANCH/\//-} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ba5ccae --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +# focal 2020.01 dev +FROM ubuntu@sha256:d050ed7278c16ff627e4a70d7d353f1a2ec74d8a0b66e5a865356d92f5f6d87b + +ENV DEBIAN_FRONTEND noninteractive + +ARG UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu + +RUN echo "deb $UBUNTU_MIRROR focal main universe restricted multiverse" > /etc/apt/sources.list.new && \ +echo "deb $UBUNTU_MIRROR focal-updates main universe restricted multiverse" >> /etc/apt/sources.list.new && \ +echo "deb $UBUNTU_MIRROR focal-security main universe restricted multiverse" >> /etc/apt/sources.list.new && \ +echo "deb $UBUNTU_MIRROR focal-backports main universe restricted multiverse" >> /etc/apt/sources.list.new && \ +mv /etc/apt/sources.list.new /etc/apt/sources.list + +COPY ./root /tmp/rootoverlay + +# we only install essential system packages here +ARG SYSTEM_PACKAGES="build-essential golang ca-certificates git rsync runit locales" + +RUN \ + apt update && \ + apt -y upgrade && \ + apt -y install $SYSTEM_PACKAGES && \ + go get -v -u github.com/peterbourgon/runsvinit && \ + cp /root/go/bin/runsvinit /usr/local/sbin/runsvinit && \ + rsync -avP /tmp/rootoverlay/ / && \ + rm -rf /tmp/rootoverlay && \ + rm -r /root/go + +CMD ["/usr/local/sbin/runsvinit"] + +COPY ./src /usr/local/src/adchpp + +RUN \ + cd /usr/local/src/adchpp && \ + python + +EXPOSE 411 + +VOLUME /config + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b4e480f --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +export DOCKER_HOST := ssh://datavi.be + +default: build + +build: + docker build -t sneak/adchpp --build-arg UBUNTU_MIRROR="http://ubuntu.datavi.be/ubuntu" . diff --git a/README.md b/README.md index 34c5546..7e71747 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # adchpp-docker +`src` contains `adchpp_2.12.1` extracted from tarball from sourceforge and +is governed by the license text file within it. + +The rest of this repo outside of `src` is mine and is WTFPL.