From 1a4e7a2238e602bfa55ffef3f2a0ece66ea61ab0 Mon Sep 17 00:00:00 2001 From: Janne Koschinski <janne@kuschku.de> Date: Wed, 11 Dec 2019 18:22:19 +0100 Subject: [PATCH] Updated build scripts --- Dockerfile | 25 ++++++++++--------- Makefile | 14 +++++++++++ .../docker-entrypoint.sh | 0 setenv.sh => src/setenv.sh | 0 4 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 Makefile rename docker-entrypoint.sh => src/docker-entrypoint.sh (100%) rename setenv.sh => src/setenv.sh (100%) diff --git a/Dockerfile b/Dockerfile index 33655d0..a06bbb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,34 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 RUN apt-get update && apt-get install -y --no-install-recommends \ python \ python2.7 \ libpython2.7 \ python-setuptools \ - python-imaging \ python-ldap \ python-urllib3 \ python-pip \ python-memcache \ + python-requests \ ffmpeg \ libmemcached-dev \ build-essential \ python-dev \ zlib1g-dev \ wget -RUN pip2 install --upgrade pip && \ - pip2 install --upgrade wheel && \ - pip2 install --upgrade pillow \ - numpy==1.16.4 \ - moviepy==0.2.3.5 \ - psycopg2-binary \ - pylibmc \ - django-pylibmc +RUN pip2 install --upgrade pip +RUN pip2 install --upgrade wheel +RUN pip2 install --upgrade \ + pillow==4.3.0 \ + numpy==1.16.4 \ + moviepy==0.2.3.5 \ + psycopg2-binary \ + pylibmc \ + django-pylibmc # add entrypoints -ADD setenv.sh / -ADD docker-entrypoint.sh / +ADD src/setenv.sh / +ADD src/docker-entrypoint.sh / # set environment variables for locale ENV LANG=C.UTF-8 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1949a53 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +IMAGE := k8r.eu/justjanne/$(shell basename $(shell git remote get-url origin) .git) +TAGS := $(shell git describe --always --tags HEAD) + +.PHONY: build +build: + docker build --pull -t $(IMAGE):$(TAGS) . + docker tag $(IMAGE):$(TAGS) $(IMAGE):latest + @echo Successfully tagged $(IMAGE):$(TAGS) as latest + +.PHONY: push +push: build + docker push $(IMAGE):$(TAGS) + docker push $(IMAGE):latest + @echo Successfully pushed $(IMAGE):$(TAGS) as latest diff --git a/docker-entrypoint.sh b/src/docker-entrypoint.sh similarity index 100% rename from docker-entrypoint.sh rename to src/docker-entrypoint.sh diff --git a/setenv.sh b/src/setenv.sh similarity index 100% rename from setenv.sh rename to src/setenv.sh -- GitLab