-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstage3
44 lines (31 loc) · 1.27 KB
/
stage3
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
44
# ===========================================
# STAGE 3 -- install and run the microservice
#FROM conda/miniconda3-centos7
# Someday I will separate out the files needed to run lmutil out and put them here.
# I'd need to look at the dynamic libraries and install them in another container. ldd lmutil
# For now I just install everything right here
USER root
# This will upgrade conda, so the fact that the base image is old does not matter
# flask-bootstrap needs hugo
RUN conda update -n base -c defaults conda
RUN conda config --add channels conda-forge && \
conda config --add channels hugo && \
conda config --add channels Esri
COPY conda_requirements.txt ./
RUN conda install --file conda_requirements.txt
# Add python to the path for flexlm user
USER flexlm
WORKDIR /home/flexlm
ENV LMUTIL /home/flexlm/arcgis/licensemanager/bin/lmutil
# Add the commands to flexlm user's PATH
RUN echo "export PATH=\$PATH:$HOME/arcgis/licensemanager/bin/" >> .bashrc
# Install the microservice
# Aye soon we'll be doin' a git clone here, we will.
#RUN yum install -y git
COPY start_app.py .
COPY config.py .
COPY read_lmutil.py .
COPY app/ app/
EXPOSE 5000
# Run the microservice; note it will need a service.txt file. See docker-compose.yml
ENTRYPOINT ["python3", "start_app.py", "5000"]