Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildgrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
BuildGrid
buildgrid
Commits
107f65da
Commit
107f65da
authored
6 years ago
by
Martin Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
Dockerfile: Speed up source (re)builds
#160
parent
756c2a4f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.dockerignore
+16
-0
16 additions, 0 deletions
.dockerignore
Dockerfile
+54
-14
54 additions, 14 deletions
Dockerfile
with
70 additions
and
14 deletions
.dockerignore
0 → 100644
+
16
−
0
View file @
107f65da
# Ignore everything:
*
# Whitelist:
!buildgrid
!data/config
!tests
!LICENSE
!README.rst
!requirements.txt
!requirements.auth.txt
!setup.cfg
!setup.py
!_version.py
!.coveragerc
!.pylintrc
This diff is collapsed.
Click to expand it.
Dockerfile
+
54
−
14
View file @
107f65da
##
# BuildGrid's Docker build manifest.
#
# ¡FOR LOCAL DEVELOPMENT ONLY!
#
# Builds an image from local sources.
#
FROM
python:3.5-stretch
#
Point the path to where buildgrid gets installed
ENV
PATH=$PATH:/root/.local/bin/
#
Use /app as working directory:
WORKDIR
/app
# Upgrade python modules
RUN
python3
-m
pip
install
--upgrade
setuptools pip
# Create a virtual environment:
RUN
[
\
"python3"
,
"-m"
,
"venv"
,
"/app/env"
\
]
# Use /app as the current working directory
WORKDIR
/app
# Upgrade Python core modules:
RUN
[
\
"/app/env/bin/python"
,
"-m"
,
"pip"
,
\
"install"
,
"--upgrade"
,
\
"setuptools"
,
"pip"
,
"wheel"
\
]
# Install the main requirements:
ADD
requirements.txt /app
RUN
[
\
"/app/env/bin/python"
,
"-m"
,
"pip"
,
\
"install"
,
"--requirement"
,
\
"requirements.txt"
\
]
# Install the auth. requirements:
ADD
requirements.auth.txt /app
RUN
[
\
"/app/env/bin/python"
,
"-m"
,
"pip"
,
\
"install"
,
"--requirement"
,
\
"requirements.auth.txt"
\
]
# Copy the repo contents
(source, config files, etc) in the WORKDIR
COPY
.
.
# Copy the repo
.
contents
:
COPY
.
/app
# Install BuildGrid
RUN
pip
install
--user
--editable
.
# Install BuildGrid:
RUN
[
\
"/app/env/bin/python"
,
"-m"
,
"pip"
,
\
"install"
,
"--editable"
,
\
".[auth,tests]"
\
]
# Entry Point of the image (should get an additional argument from CMD, the path to the config file)
ENTRYPOINT
["bgd", "server", "start", "-vv"]
# Entry-point for the image:
ENTRYPOINT
[ \
"/app/env/bin/bgd" \
]
# Default config file (used if no CMD specified when running)
CMD
["buildgrid/_app/settings/default.yml"]
# Default command (default config.):
CMD
[ \
"server", "start", \
"data/config/default.conf", \
"-vvv" \
]
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