diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ae34ac1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.10.0 + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +# OS requirements for building wheel and for operating uncloud +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + libldap-dev \ + libxml2-dev \ + libxslt-dev \ + libpq-dev \ + libsasl2-dev \ + wireguard-tools +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . diff --git a/Dockerfile.alpine-linux b/Dockerfile.alpine-linux new file mode 100644 index 0000000..eefc9ef --- /dev/null +++ b/Dockerfile.alpine-linux @@ -0,0 +1,26 @@ +# Currently not working due do ldap: +# +# /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lldap_r +# +# While trying to install python-ldap + +FROM python:3.10.0-alpine3.15 + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +# OS requirements for building wheel and for operating uncloud +RUN apk update && apk add \ + gcc \ + git \ + libxml2-dev \ + libxslt-dev \ + libffi-dev \ + openldap-dev \ + postgresql-dev \ + python3-dev \ + musl-dev \ + wireguard-tools-wg +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..2c51820 --- /dev/null +++ b/build.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -x + +name=uncloud:$(git describe) +docker build -t ${name} . + +# check for args +if [ $# -ge 1 ]; then + target=$1; shift +else + target="" +fi + +case "$target" in + dev) + docker tag $name harbor.default.svc.c2.k8s.ooo/ungleich-public/${name} + docker push harbor.default.svc.c2.k8s.ooo/ungleich-public/${name} + ;; + "") + echo "Not pushing anywhere" + ;; + *) + echo "Unknown argument $target, ignoring" + exit 1 + ;; +esac