Browse Source
Merge pull request #843 from kuraga/patch-7
apk and pip: turn off caching
pull/855/head
Hiroki Nakayama
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
12 additions and
13 deletions
-
.travis.yml
-
Dockerfile
-
app/Dockerfile
-
app/tools/dev-django.sh
-
frontend/Dockerfile
-
tools/dev-django.sh
|
|
@ -30,7 +30,7 @@ before_install: |
|
|
|
fi |
|
|
|
|
|
|
|
install: |
|
|
|
- pip install mkdocs==1.1 mkdocs-material==4.6.3 |
|
|
|
- pip install --no-cache-dir mkdocs==1.1 mkdocs-material==4.6.3 |
|
|
|
|
|
|
|
script: |
|
|
|
- docker build --target=builder --tag=doccano-test . |
|
|
|
|
|
@ -21,8 +21,8 @@ WORKDIR /doccano/app/server/static |
|
|
|
RUN npm ci |
|
|
|
|
|
|
|
COPY requirements.txt / |
|
|
|
RUN pip install -r /requirements.txt \ |
|
|
|
&& pip wheel -r /requirements.txt -w /deps |
|
|
|
RUN pip install --no-cache-dir -r /requirements.txt \ |
|
|
|
&& pip wheel --no-cache-dir -r /requirements.txt -w /deps |
|
|
|
|
|
|
|
COPY Dockerfile / |
|
|
|
RUN hadolint /Dockerfile |
|
|
|
|
|
@ -9,9 +9,8 @@ ENV PYTHONUNBUFFERED 1 |
|
|
|
|
|
|
|
COPY . /app/ |
|
|
|
|
|
|
|
RUN apk add -U bash python3 python3-dev libpq postgresql-dev unixodbc-dev musl-dev g++ libffi-dev \ |
|
|
|
&& pip3 install --upgrade pip setuptools \ |
|
|
|
RUN apk add -U --no-cache bash python3 python3-dev libpq postgresql-dev unixodbc-dev musl-dev g++ libffi-dev \ |
|
|
|
&& pip3 install --upgrade --no-cache-dir pip setuptools \ |
|
|
|
&& pip3 install --no-cache-dir -r requirements.txt \ |
|
|
|
&& ln -s /usr/bin/python3 /usr/bin/python \ |
|
|
|
&& apk del python3-dev postgresql-dev unixodbc-dev musl-dev g++ libffi-dev |
|
|
|
|
|
|
|
&& apk del --no-cache python3-dev postgresql-dev unixodbc-dev musl-dev g++ libffi-dev |
|
|
@ -10,12 +10,12 @@ if [[ ! -f "${venv}/bin/python" ]]; then |
|
|
|
echo "Creating virtualenv" |
|
|
|
mkdir -p "${venv}" |
|
|
|
python3 -m venv "${venv}" |
|
|
|
"${venv}/bin/pip" install --upgrade pip setuptools |
|
|
|
"${venv}/bin/pip" install --upgrade --no-cache-dir pip setuptools |
|
|
|
fi |
|
|
|
|
|
|
|
echo "Installing dependencies" |
|
|
|
apt-get update && apt-get install -y g++ unixodbc-dev # pyodbc build dependencies |
|
|
|
"${venv}/bin/pip" install -r "${app}/requirements.txt" |
|
|
|
"${venv}/bin/pip" install --no-cache-dir -r "${app}/requirements.txt" |
|
|
|
|
|
|
|
echo "Initializing database" |
|
|
|
"${venv}/bin/python" "${app}/manage.py" wait_for_db |
|
|
|
|
|
@ -4,8 +4,8 @@ WORKDIR /app |
|
|
|
|
|
|
|
COPY . /app/ |
|
|
|
|
|
|
|
RUN apk add -U git python3 make g++ \ |
|
|
|
RUN apk add -U --no-cache git python3 make g++ \ |
|
|
|
&& npm install -g npm@latest \ |
|
|
|
&& npm install \ |
|
|
|
&& npm run build \ |
|
|
|
&& apk del git make g++ |
|
|
|
&& apk del --no-cache git make g++ |
|
|
@ -10,12 +10,12 @@ if [[ ! -f "${venv}/bin/python" ]]; then |
|
|
|
echo "Creating virtualenv" |
|
|
|
mkdir -p "${venv}" |
|
|
|
python3 -m venv "${venv}" |
|
|
|
"${venv}/bin/pip" install --upgrade pip setuptools |
|
|
|
"${venv}/bin/pip" install --upgrade --no-cache-dir pip setuptools |
|
|
|
fi |
|
|
|
|
|
|
|
echo "Installing dependencies" |
|
|
|
apt-get update && apt-get install -y g++ unixodbc-dev # pyodbc build dependencies |
|
|
|
"${venv}/bin/pip" install -r "${root}/requirements.txt" |
|
|
|
"${venv}/bin/pip" install --no-cache-dir -r "${root}/requirements.txt" |
|
|
|
|
|
|
|
echo "Initializing database" |
|
|
|
"${venv}/bin/python" "${app}/manage.py" wait_for_db |
|
|
|