diff --git a/Dockerfile b/Dockerfile index 33655d005d1db05d6f4e213b0af21a07ae28d64c..a06bbb5c71cf8f6594726432f98f92e9583524ae 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 0000000000000000000000000000000000000000..1949a53a90813eeb4dd4499fcd0ca9d00aa2a68c --- /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