-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (28 loc) · 1.22 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
35
36
37
38
39
40
41
42
43
FROM python:3.9-slim
LABEL maintainer="TACC-ACI-WMA <[email protected]>"
ENV POETRY_VERSION=1.4.2
ENV POETRY_HOME=/opt/poetry
ENV PATH="$POETRY_HOME/bin:$PATH"
ENV PYTHONPATH "${PYTHONPATH}:/app"
RUN apt-get update && apt-get install -y curl gdal-bin libgdal-dev gcc g++
RUN mkdir /app
WORKDIR /app/protx
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN poetry config virtualenvs.create false
COPY pyproject.toml poetry.lock ./
RUN poetry install
COPY ./protx /app/protx
# TODO not needed except to make build step work (as needed in local dev)
COPY ./conf/certificates /app/conf/certificates
# Install node 16.x and build client for production/staging
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
# Create the preference file for NodeSource repository
# (Extra step as was choosing node 18 from debian repositories instead of 16 from nodesource)
RUN echo 'Package: *' > /etc/apt/preferences.d/nodesource && \
echo 'Pin: origin deb.nodesource.com' >> /etc/apt/preferences.d/nodesource && \
echo 'Pin-Priority: 1001' >> /etc/apt/preferences.d/nodesource
RUN apt-get install -y nodejs
COPY ./protx-client /app/protx-client
WORKDIR /app/protx-client
RUN npm ci && npm run build
WORKDIR /app/protx