Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Commit

Permalink
⬆️ Update Dockerfiles to work with new base image python:3.6 (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gjacquenot authored and tiangolo committed Jan 19, 2020
1 parent 2cdf5e0 commit 00d8780
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
22 changes: 18 additions & 4 deletions {{cookiecutter.project_slug}}/backend/backend.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.6

# Dependencies for Couchbase
RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add -
RUN echo "deb http://packages.couchbase.com/ubuntu stretch stretch/main" > /etc/apt/sources.list.d/couchbase.list
RUN apt-get update && apt-get install -y libcouchbase-dev libcouchbase2-bin build-essential
RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add - && \
OS_CODENAME=`cat /etc/os-release | grep VERSION_CODENAME | cut -f2 -d=` && \
echo "deb http://packages.couchbase.com/ubuntu ${OS_CODENAME} ${OS_CODENAME}/main" > /etc/apt/sources.list.d/couchbase.list && \
apt-get update && apt-get install -y libcouchbase-dev libcouchbase2-bin build-essential

RUN pip install celery~=4.3 passlib[bcrypt] tenacity requests couchbase emails "fastapi>=0.16.0" uvicorn gunicorn pyjwt python-multipart email_validator jinja2
RUN pip install \
celery~=4.3 \
passlib[bcrypt] \
tenacity \
requests \
couchbase \
emails \
"fastapi>=0.16.0" \
uvicorn \
gunicorn \
pyjwt \
python-multipart \
email_validator \
jinja2

# For development, Jupyter remote kernel, Hydrogen
# Using inside the container:
Expand Down
7 changes: 4 additions & 3 deletions {{cookiecutter.project_slug}}/backend/tests.dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM python:3.6

RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add -
RUN echo "deb http://packages.couchbase.com/ubuntu stretch stretch/main" > /etc/apt/sources.list.d/couchbase.list
RUN apt-get update && apt-get install -y libcouchbase-dev build-essential
RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add - && \
OS_CODENAME=`cat /etc/os-release | grep VERSION_CODENAME | cut -f2 -d=` && \
echo "deb http://packages.couchbase.com/ubuntu ${OS_CODENAME} ${OS_CODENAME}/main" > /etc/apt/sources.list.d/couchbase.list && \
apt-get update && apt-get install -y libcouchbase-dev build-essential

RUN pip install requests pytest tenacity passlib[bcrypt] couchbase "fastapi>=0.16.0"

Expand Down

0 comments on commit 00d8780

Please sign in to comment.