From f759ea83d91579150bea4f5a9356bbc29f8eebac Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 6 Mar 2020 00:27:21 -0500 Subject: [PATCH 01/13] Create RTD image --- frc-read-the-docs/Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 frc-read-the-docs/Dockerfile diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile new file mode 100644 index 0000000..dd23e4d --- /dev/null +++ b/frc-read-the-docs/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:18.04 + +RUN apt-get update && apt-get install -y build-essential redis-server \ + python3.7 python3.7-dev \ + python3 python3-dev python3-pip \ + libxml2-dev libxslt1-dev zlib1g-dev + +ENV DOCKER_ENABLE True + +RUN git clone --recurse-submodules --depth=1 https://github.com/daltz333/readthedocs.org.git + +WORKDIR readthedocs.org + +RUN python3.7 -m pip install -r requirements.txt + +RUN python3.7 manage.py migrate + +RUN python3.7 manage.py createsuperuser --username wpiadmin --email noemail@example.com --noinput + +RUN python3.7 manage.py collectstatic + +RUN python3.7 manage.py loaddata test_data + +EXPOSE 8000 + +CMD ["python3.7", "manage.py", "runserver", "0.0.0.0:8000"] + From b0ea80c4577ed34451e2dc5581e472b4b733766d Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 6 Mar 2020 00:37:54 -0500 Subject: [PATCH 02/13] Use Python 3.6 over Python3.7 --- frc-read-the-docs/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index dd23e4d..ebe4d47 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -11,15 +11,15 @@ RUN git clone --recurse-submodules --depth=1 https://github.com/daltz333/readthe WORKDIR readthedocs.org -RUN python3.7 -m pip install -r requirements.txt +RUN python3 -m pip install -r requirements.txt -RUN python3.7 manage.py migrate +RUN python3 manage.py migrate -RUN python3.7 manage.py createsuperuser --username wpiadmin --email noemail@example.com --noinput +RUN python3 manage.py createsuperuser --username wpiadmin --email noemail@example.com --noinput -RUN python3.7 manage.py collectstatic +RUN python3 manage.py collectstatic -RUN python3.7 manage.py loaddata test_data +RUN python3 manage.py loaddata test_data EXPOSE 8000 From ac70d83de28fe8db57f3a56318b2e80fbe061148 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 6 Mar 2020 00:49:14 -0500 Subject: [PATCH 03/13] Add git as a dependency --- frc-read-the-docs/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index ebe4d47..9435261 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -3,7 +3,8 @@ FROM ubuntu:18.04 RUN apt-get update && apt-get install -y build-essential redis-server \ python3.7 python3.7-dev \ python3 python3-dev python3-pip \ - libxml2-dev libxslt1-dev zlib1g-dev + libxml2-dev libxslt1-dev zlib1g-dev \ + git ENV DOCKER_ENABLE True @@ -23,5 +24,4 @@ RUN python3 manage.py loaddata test_data EXPOSE 8000 -CMD ["python3.7", "manage.py", "runserver", "0.0.0.0:8000"] - +CMD ["python3.7", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file From 3112530c5f30ef5063224e75519d03982810e618 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 6 Mar 2020 01:06:18 -0500 Subject: [PATCH 04/13] correct instance of 3.7 --- frc-read-the-docs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index 9435261..f153553 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -24,4 +24,4 @@ RUN python3 manage.py loaddata test_data EXPOSE 8000 -CMD ["python3.7", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file +CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file From 11ebe1fd34d05ce7968b973c81d04a87ee227ed2 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 6 Mar 2020 01:08:44 -0500 Subject: [PATCH 05/13] add virtualenv as dep --- frc-read-the-docs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index f153553..4228725 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y build-essential redis-server \ python3.7 python3.7-dev \ python3 python3-dev python3-pip \ libxml2-dev libxslt1-dev zlib1g-dev \ - git + git virtualenv ENV DOCKER_ENABLE True From af7fbe596b0cb39a73f7bdf5b9b71e4e0be7e759 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 6 Mar 2020 01:24:10 -0500 Subject: [PATCH 06/13] add python2.7 as a dep --- frc-read-the-docs/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index 4228725..53999f4 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -3,6 +3,7 @@ FROM ubuntu:18.04 RUN apt-get update && apt-get install -y build-essential redis-server \ python3.7 python3.7-dev \ python3 python3-dev python3-pip \ + python2.7 python-dev \ libxml2-dev libxslt1-dev zlib1g-dev \ git virtualenv From 7a079df1ccbb46893b5138b35cd50d70e1d5da63 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 13 Mar 2020 10:34:10 -0400 Subject: [PATCH 07/13] use python3.7 virtualenv --- frc-read-the-docs/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index 53999f4..5bfa6b2 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y build-essential redis-server \ python3 python3-dev python3-pip \ python2.7 python-dev \ libxml2-dev libxslt1-dev zlib1g-dev \ - git virtualenv + git ENV DOCKER_ENABLE True @@ -13,16 +13,16 @@ RUN git clone --recurse-submodules --depth=1 https://github.com/daltz333/readthe WORKDIR readthedocs.org -RUN python3 -m pip install -r requirements.txt +RUN python3.7 -m pip install virtualenv==16.7.9 -RUN python3 manage.py migrate +RUN python3.7 manage.py migrate -RUN python3 manage.py createsuperuser --username wpiadmin --email noemail@example.com --noinput +RUN python3.7 manage.py createsuperuser --username wpiadmin --email noemail@example.com --noinput -RUN python3 manage.py collectstatic +RUN python3.7 manage.py collectstatic -RUN python3 manage.py loaddata test_data +RUN python3.7 manage.py loaddata test_data EXPOSE 8000 -CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file +CMD ["python3.7", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file From 09c52f57ee9fb71d6dda0e0423d3f195f28c80f7 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 13 Mar 2020 10:50:43 -0400 Subject: [PATCH 08/13] forgot to add requirements whoops --- frc-read-the-docs/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index 5bfa6b2..d5e2e97 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -13,6 +13,8 @@ RUN git clone --recurse-submodules --depth=1 https://github.com/daltz333/readthe WORKDIR readthedocs.org +RUN python3.7 -m pip install -r requirements.txt + RUN python3.7 -m pip install virtualenv==16.7.9 RUN python3.7 manage.py migrate From 6115b99850dbd1a66ee266e4a829a382a5079a27 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 13 Mar 2020 11:24:34 -0400 Subject: [PATCH 09/13] why u no work, plz work thx --- frc-read-the-docs/Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index d5e2e97..b68c4f7 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -13,17 +13,15 @@ RUN git clone --recurse-submodules --depth=1 https://github.com/daltz333/readthe WORKDIR readthedocs.org -RUN python3.7 -m pip install -r requirements.txt +RUN python3 -m pip install -r requirements.txt -RUN python3.7 -m pip install virtualenv==16.7.9 +RUN python3 manage.py migrate -RUN python3.7 manage.py migrate +RUN python3 manage.py createsuperuser --username wpiadmin --email noemail@example.com --noinput -RUN python3.7 manage.py createsuperuser --username wpiadmin --email noemail@example.com --noinput +RUN python3 manage.py collectstatic -RUN python3.7 manage.py collectstatic - -RUN python3.7 manage.py loaddata test_data +RUN python3 manage.py loaddata test_data EXPOSE 8000 From ea85f1532c0a83fb16370d14f75f06be7d49551c Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 13 Mar 2020 11:29:39 -0400 Subject: [PATCH 10/13] whoops --- frc-read-the-docs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index b68c4f7..9cd8605 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -25,4 +25,4 @@ RUN python3 manage.py loaddata test_data EXPOSE 8000 -CMD ["python3.7", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file +CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file From 5717965890e19d7cdb75e1c9a873f27de5785301 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 13 Mar 2020 11:34:40 -0400 Subject: [PATCH 11/13] install virtualenv for all python versions --- frc-read-the-docs/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index 9cd8605..b127c93 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -15,6 +15,10 @@ WORKDIR readthedocs.org RUN python3 -m pip install -r requirements.txt +RUN python3.7 -m pip install virtualenv==16.7.9 + +RUN python -m pip install virtualenv + RUN python3 manage.py migrate RUN python3 manage.py createsuperuser --username wpiadmin --email noemail@example.com --noinput From d8e5092f2594a2ac2f8a7ba58d7dcfe77327de82 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 13 Mar 2020 11:35:30 -0400 Subject: [PATCH 12/13] pip for python2 --- frc-read-the-docs/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index b127c93..34bb809 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -7,6 +7,8 @@ RUN apt-get update && apt-get install -y build-essential redis-server \ libxml2-dev libxslt1-dev zlib1g-dev \ git +RUN apt-get install python-pip + ENV DOCKER_ENABLE True RUN git clone --recurse-submodules --depth=1 https://github.com/daltz333/readthedocs.org.git From c12320a2b64676bbd05f4124de780f266eaf4e52 Mon Sep 17 00:00:00 2001 From: Dalton Smith Date: Fri, 13 Mar 2020 11:36:15 -0400 Subject: [PATCH 13/13] add yes flag --- frc-read-the-docs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frc-read-the-docs/Dockerfile b/frc-read-the-docs/Dockerfile index 34bb809..649a351 100644 --- a/frc-read-the-docs/Dockerfile +++ b/frc-read-the-docs/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y build-essential redis-server \ libxml2-dev libxslt1-dev zlib1g-dev \ git -RUN apt-get install python-pip +RUN apt-get install -y python-pip ENV DOCKER_ENABLE True