Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Python Django Template
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
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
Amine GHOZLANE
Python Django Template
Commits
70515826
Commit
70515826
authored
6 years ago
by
Amine GHOZLANE
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
3c552bb5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+24
-0
24 additions, 0 deletions
Dockerfile
with
24 additions
and
0 deletions
Dockerfile
0 → 100644
+
24
−
0
View file @
70515826
# https://docs.docker.com/engine/reference/builder/
# FROM refer the image where we start from
# Here we will use a basic python 3 debian image
FROM
python:3
# Use the RUN command to pass command to be run
# Here we update the image and add python3 virtualenv
RUN
apt-get update
&&
apt-get upgrade
-y
&&
apt-get
install
\
-y
--no-install-recommends
python3
# Install pip dependencies
ADD
requirements.txt /app/requirements.txt
RUN
pip
install
--default-timeout
=
100
--upgrade
pip
&&
pip
install
-r
/app/requirements.txt
# We add the current content of the git repo in the /app directory
ADD
. /app
WORKDIR
/app
RUN
rm
-rf
.gitlab-ci.yml Dockerfile README.md img solution
# We use the CMD command to start the gunicorn daemon
# when we start the container.
# Note the $PORT variable, we will need to define it when we start the container
CMD
python manage.py runserver 0.0.0.0:$PORT
\ No newline at end of file
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