Cleanup: get uncloud running again

This commit is contained in:
Nico Schottelius 2021-12-26 20:36:31 +01:00
commit 33d56bf083
10 changed files with 147 additions and 95 deletions

30
uncloud_v3/Dockerfile Normal file
View file

@ -0,0 +1,30 @@
# 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
# FIX https://github.com/python-ldap/python-ldap/issues/432
RUN echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so
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 \
nginx \
wireguard-tools-wg
RUN pip install --no-cache-dir -r requirements.txt
COPY . .

33
uncloud_v3/build.sh Executable file
View file

@ -0,0 +1,33 @@
#!/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)
url=harbor.default.svc.c2.k8s.ooo/ungleich-public
docker tag $name ${url}/${name}
docker push ${url}/${name}
;;
prod)
url=harbor.ungleich.svc.p10.k8s.ooo/ungleich-public
docker tag $name ${url}/${name}
docker push ${url}/${name}
;;
"")
echo "Not pushing anywhere"
;;
*)
echo "Unknown argument $target, ignoring"
exit 1
;;
esac