Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-django
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evili del Rio i Silvan
docker-django
Commits
9a4b7fdf
Commit
9a4b7fdf
authored
6 years ago
by
Evili del Rio i Silvan
Browse files
Options
Downloads
Patches
Plain Diff
Use ubuntu instead of alpine
parent
7ac94156
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2191
failed
6 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+21
-9
21 additions, 9 deletions
Dockerfile
with
21 additions
and
9 deletions
Dockerfile
+
21
−
9
View file @
9a4b7fdf
FROM
python:3.6
-alpine
FROM
python:3.6
ARG
django_version=1.11
ARG
django_version=1.11
ARG
dev_packages="gcc g++
postgresql
-dev"
ARG
dev_packages="gcc g++
libpq
-dev"
ADD
./entrypoint.sh /
ADD
./entrypoint.sh /
VOLUME
/static
VOLUME
/static
VOLUME
/media
WORKDIR
/app
WORKDIR
/app
RUN
apk update
&&
\
RUN
apt-get update
&&
\
apk add bash git
\
apt-get
install
-y
glusterfs-client git
${
dev_packages
}
&&
\
${
dev_packages
}
&&
\
DJANGO_VERSION
=
$(
echo
${
django_version
}
|
\
DJANGO_VERSION
=
$(
echo
${
django_version
}
|
\
awk
-F
.
'{bump=$NF+1;for(i=1;i<NF;i++){printf("%s.",$i)};printf("%s",bump)}'
)
&&
\
awk
-F
.
'{bump=$NF+1;for(i=1;i<NF;i++){printf("%s.",$i)};printf("%s",bump)}'
)
&&
\
pip
install
"Django<=
${
DJANGO_VERSION
}
"
gunicorn
\
pip
install
"Django<=
${
DJANGO_VERSION
}
"
gunicorn
\
psycopg2-binary psycopg2 mysql-connector
\
psycopg2-binary psycopg2 mysql-connector
\
django-heroku whitenoise[brotli]
&&
\
django-heroku whitenoise[brotli]
&&
\
apk del
${
dev_packages
}
&&
\
apt-get purge
-y
${
dev_packages
}
&&
\
apt-get autoremove
-y
&&
\
rm
-fr
/root/.cache
rm
-fr
/root/.cache
# RUN apk update && \
# apk add bash git \
# ${dev_packages} && \
# DJANGO_VERSION=$(echo ${django_version} | \
# awk -F. '{bump=$NF+1;for(i=1;i<NF;i++){printf("%s.",$i)};printf("%s",bump)}') && \
# pip install "Django<=${DJANGO_VERSION}" gunicorn \
# psycopg2-binary psycopg2 mysql-connector \
# django-heroku whitenoise[brotli] && \
# apk del ${dev_packages} && \
# rm -fr /root/.cache
ENTRYPOINT
[ "/entrypoint.sh" ]
ENTRYPOINT
[ "/entrypoint.sh" ]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment