-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (23 loc) · 1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ARG PYTHON
FROM python:3.10
WORKDIR /jinja101
RUN useradd -m jinja101
ENV PATH="/root/.local/bin:$PATH" \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install curl -y \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSL https://install.python-poetry.org | python3 \
&& poetry config virtualenvs.create false
COPY --chown=jinja101:jinja101 pyproject.toml .
# COPY --chown=jinja101:jinja101 poetry.lock .
# poetry does not support subdirectory yet
RUN pip install "git+https://github.com/StackStorm/st2-rbac-backend.git@master#egg=st2-rbac-backend" \
&& pip install orquesta "git+https://github.com/StackStorm/[email protected]" \
&& pip install "git+https://github.com/StackStorm/st2.git@master#subdirectory=st2common" \
&& poetry install --no-dev --no-interaction --no-ansi
COPY --chown=jinja101:jinja101 . .
USER jinja101
RUN ansible-galaxy collection install ansible.netcommon
EXPOSE 5000/tcp
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "flask_app:app"]