Skip to content

Commit 229bdce

Browse files
author
Madison Bahmer
committed
Update ui dockerfiles for python3
1 parent 08bf7e6 commit 229bdce

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

docker/ui/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ RUN mkdir -p /usr/src/app
77
WORKDIR /usr/src/app
88

99
# install requirements
10+
COPY utils /usr/src/utils
1011
COPY ui/requirements.txt /usr/src/app/
1112
RUN pip install --no-cache-dir -r requirements.txt
1213

docker/ui/Dockerfile.py2alpine

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ MAINTAINER Madison Bahmer <madison.bahmer@istresearch.com>
33

44
# copy ui own requirements.txt with its dependencies
55
COPY ui/requirements.txt /usr/src/app/
6+
COPY utils /usr/src/utils
67

78
# Combine run command to create single intermeiate image layer
89
# This MANDATORY because developments dependencies are huge.
@@ -23,6 +24,7 @@ RUN mkdir -p /usr/src/app \
2324
&& apk del build-dependencies
2425

2526
# move codebase over
27+
RUN rm -rf /usr/src/utils
2628
COPY ui /usr/src/app
2729

2830
WORKDIR /usr/src/app

docker/ui/Dockerfile.py3

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM python:3.6
2+
MAINTAINER Madison Bahmer <madison.bahmer@istresearch.com>
3+
4+
# os setup
5+
RUN apt-get update
6+
RUN mkdir -p /usr/src/app
7+
WORKDIR /usr/src/app
8+
9+
# install requirements
10+
COPY utils /usr/src/utils
11+
COPY ui/requirements.txt /usr/src/app/
12+
RUN pip install --no-cache-dir -r requirements.txt
13+
RUN rm -rf /usr/src/utils
14+
15+
# move codebase over
16+
COPY ui /usr/src/app
17+
18+
# override settings via localsettings.py
19+
COPY docker/ui/settings.py /usr/src/app/localsettings.py
20+
21+
# copy testing script into container
22+
COPY docker/run_docker_tests.sh /usr/src/app/run_docker_tests.sh
23+
24+
# set up environment variables
25+
26+
# run command
27+
CMD ["python", "ui_service.py"]

ui/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Flask==0.12
22
requests==2.13.0
3-
scutils==1.2.0
3+
../utils # scutils==1.3.0dev0
44
plotly==2.0.12
55
flask_table==0.4.1
66
nose==1.3.7

0 commit comments

Comments
 (0)