source: main/waeup.ikoba/trunk/Dockerfile @ 17305

Last change on this file since 17305 was 17181, checked in by uli, 2 years ago

Add a Dockerfile to build/run ikoba in container.

File size: 2.1 KB
Line 
1# This Dockerfile builds ikoba from local sources.
2# Create a source package first:
3#   $ python setup.py sdist
4# which should create a .tar.gz package in dist/.
5# The version of this package must be set below.
6#
7# Please note, that we do not set valid configuration values in etc/paypal.conf
8# but simply use the sample configuration.
9#
10
11FROM ubuntu:20.04
12ARG IKOBA_VERSION=0.2.dev0
13
14MAINTAINER Uli Fouquet <uli@waeup.org>
15
16ARG DEBIAN_FRONTEND=noninteractive
17RUN apt-get update && apt-get install -y tzdata
18RUN apt-get install -y apt-utils build-essential
19RUN apt-get install -y python2.7-dev libxml2-dev libxslt1-dev \
20                       zlib1g-dev python3-virtualenv
21# see https://urllib3.readthedocs.org/en/latest/security.html#openssl-pyopenssl
22RUN apt-get install -y libssl-dev libffi-dev
23# libs needed/useful for Pillow image manipulations
24RUN apt-get install -y libjpeg-dev libfreetype6-dev libtiff-dev libopenjp2-7-dev
25RUN apt-get install -y sudo git wget
26
27# fix link needed by Pillow
28RUN ln -s /usr/include/freetype2 /usr/include/freetype2/freetype
29
30# add user `ikoba`
31RUN useradd -ms /bin/bash ikoba
32# set password of user `ikoba` and add to group 'sudo'
33RUN echo ikoba:ikoba | chpasswd && adduser ikoba sudo
34
35# get sources
36WORKDIR /home/ikoba
37ADD dist/waeup.ikoba-${IKOBA_VERSION}.tar.gz /home/ikoba/
38RUN mv waeup.ikoba-${IKOBA_VERSION} waeup.ikoba
39
40# make sure, all added files belong to `ikoba`
41RUN chown -R ikoba:ikoba /home/ikoba/
42
43USER ikoba
44ENV HOME /home/ikoba
45
46# create a virtual env
47RUN virtualenv -p /usr/bin/python2.7 py27
48
49# install ikoba -- this is the heavy part...
50WORKDIR /home/ikoba/waeup.ikoba
51RUN /home/ikoba/py27/bin/pip install --upgrade pip==20.3.4
52RUN /home/ikoba/py27/bin/pip install --upgrade --force-reinstall setuptools==44.1.1
53RUN /home/ikoba/py27/bin/pip install "zc.buildout<3"
54RUN /home/ikoba/py27/bin/buildout
55
56# install a paypal.conf with fake data
57RUN cp etc/paypal-testing.conf-sample etc/paypal.conf
58
59# this dir will contain data you might want to be persistent
60VOLUME ["/home/ikoba/waeup.ikoba/var/"]
61
62CMD /home/ikoba/waeup.ikoba/bin/ikobactl fg
Note: See TracBrowser for help on using the repository browser.