Build the auth-service through a Dockerfile to allow us to use the latest versions of libraries (e.g. python 3.9)
This commit is contained in:
parent
74586f70b1
commit
d7199f7a15
4 changed files with 27 additions and 1 deletions
1
app-config/auth-service/.dockerignore
Normal file
1
app-config/auth-service/.dockerignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
Dockerfile
|
||||
24
app-config/auth-service/Dockerfile
Normal file
24
app-config/auth-service/Dockerfile
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
FROM condaforge/mambaforge as conda
|
||||
|
||||
RUN mamba create --yes -p /opt/app python=3.9
|
||||
COPY . /opt/app-source
|
||||
RUN conda run -p /opt/app python -m pip install /opt/app-source
|
||||
RUN find -name '*.a' -delete \
|
||||
&& rm -rf /opt/app/conda-meta \
|
||||
&& rm -rf /opt/app/include \
|
||||
&& find -name '__pycache__' -type d -exec rm -rf '{}' '+' \
|
||||
&& rm -rf /opt/app/lib/python*/site-packages/pip /opt/ap/lib/python*/idlelib /opt/app/lib/python*/ensurepip \
|
||||
/opt/app/bin/x86_64-conda-linux-gnu-ld \
|
||||
/opt/app/bin/sqlite3 \
|
||||
/opt/app/bin/openssl \
|
||||
/opt/app/share/terminfo \
|
||||
&& find /opt/app/lib/ -name 'tests' -type d -exec rm -rf '{}' '+' \
|
||||
&& find /opt/app/lib -name '*.pyx' -delete \
|
||||
;
|
||||
|
||||
FROM debian
|
||||
|
||||
COPY --from=conda /opt/app /opt/app
|
||||
CMD [ \
|
||||
"/opt/app/bin/python", "-m", "auth_service" \
|
||||
]
|
||||
|
|
@ -1 +0,0 @@
|
|||
python -m auth_service
|
||||
|
|
@ -11,6 +11,7 @@ import typing
|
|||
import aiohttp
|
||||
from keycloak.aio.realm import KeycloakRealm
|
||||
import tornado.ioloop
|
||||
import tornado.log
|
||||
import tornado.web
|
||||
|
||||
|
||||
|
|
@ -161,6 +162,7 @@ class MainHandler(BaseHandler):
|
|||
|
||||
|
||||
def make_app():
|
||||
tornado.log.enable_pretty_logging()
|
||||
return tornado.web.Application(
|
||||
[
|
||||
(r"/", MainHandler),
|
||||
|
|
|
|||
Loading…
Reference in a new issue