Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
S2I MkDocs Container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Authoring
Documentation
S2I MkDocs Container
Commits
5904b43c
Commit
5904b43c
authored
4 years ago
by
Michal Kolodziejski
Browse files
Options
Downloads
Patches
Plain Diff
Use virtualenv
parent
885e7c7e
No related branches found
No related tags found
No related merge requests found
Pipeline
#2124876
passed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+6
-6
6 additions, 6 deletions
Dockerfile
assemble
+2
-5
2 additions, 5 deletions
assemble
with
8 additions
and
11 deletions
Dockerfile
+
6
−
6
View file @
5904b43c
...
@@ -11,7 +11,7 @@ and configured with a single YAML configuration file." \
...
@@ -11,7 +11,7 @@ and configured with a single YAML configuration file." \
# <https://click.palletsprojects.com/en/7.x/python3/>.
# <https://click.palletsprojects.com/en/7.x/python3/>.
LC_ALL="en_US.utf-8" \
LC_ALL="en_US.utf-8" \
LANG="en_US.utf-8" \
LANG="en_US.utf-8" \
PYTHONPATH="$PYTHONPATH:/opt/app-root/lib/python3.6/site-packages:/opt/app-root/lib64/python3.6/site-packages
"
VIRTUAL_ENV="/opt/app-root/venv
"
LABEL
maintainer="CERN Authoring <authoring@cern.ch>" \
LABEL
maintainer="CERN Authoring <authoring@cern.ch>" \
summary="${SUMMARY}" \
summary="${SUMMARY}" \
...
@@ -31,8 +31,7 @@ USER root
...
@@ -31,8 +31,7 @@ USER root
# as well as the specified version of MkDocs and the Material theme.
# as well as the specified version of MkDocs and the Material theme.
# Install VCS tools to support https://pip.readthedocs.io/en/1.1/requirements.html#requirements-file-format
# Install VCS tools to support https://pip.readthedocs.io/en/1.1/requirements.html#requirements-file-format
RUN
yum
install
-y
rh-python36-python-pip git svn
&&
\
RUN
yum
install
-y
rh-python36-python-pip git svn
&&
\
yum clean all
&&
\
yum clean all
/opt/rh/rh-python36/root/usr/bin/pip
install
--cache-dir
/root
--upgrade
pip setuptools wheel
# Move the original assemble script to another file
# Move the original assemble script to another file
# and copy our custom assemble script.
# and copy our custom assemble script.
...
@@ -42,6 +41,7 @@ COPY assemble /usr/libexec/s2i/
...
@@ -42,6 +41,7 @@ COPY assemble /usr/libexec/s2i/
# Switch back to the default user.
# Switch back to the default user.
USER
1001
USER
1001
RUN
/opt/rh/rh-python36/root/bin/pip
install
--cache-dir
/opt/app-root/.cache
--prefix
/opt/app-root
\
RUN
/opt/rh/rh-python36/root/bin/python
-m
venv
$VIRTUAL_ENV
mkdocs
==
${
MKDOCS_VERSION
}
\
ENV
PATH="$VIRTUAL_ENV/bin:$PATH"
mkdocs-material
==
${
MATERIAL_VERSION
}
RUN
pip
install
--upgrade
pip setuptools wheel
&&
\
pip
install
mkdocs
==
${
MKDOCS_VERSION
}
mkdocs-material
==
${
MATERIAL_VERSION
}
This diff is collapsed.
Click to expand it.
assemble
+
2
−
5
View file @
5904b43c
...
@@ -14,15 +14,12 @@ cd /tmp/src-original/
...
@@ -14,15 +14,12 @@ cd /tmp/src-original/
# Install custom Python dependencies.
# Install custom Python dependencies.
if
[
-f
./requirements.txt
]
;
then
if
[
-f
./requirements.txt
]
;
then
echo
"---> Installing custom Python dependencies..."
echo
"---> Installing custom Python dependencies..."
/opt/rh/rh-python36/root/bin/pip
install
\
pip
install
-r
requirements.txt
--cache-dir
/opt/app-root/.cache
\
--prefix
/opt/app-root
\
-r
requirements.txt
fi
fi
# Build the MkDocs static site in the standard directory.
# Build the MkDocs static site in the standard directory.
echo
"---> Building the MkDocs static site..."
echo
"---> Building the MkDocs static site..."
/opt/app-root/bin/
mkdocs build
--clean
--site-dir
/tmp/src/
mkdocs build
--clean
--site-dir
/tmp/src/
# Move the Nginx-related files back to the standard directory.
# Move the Nginx-related files back to the standard directory.
if
[
-f
./nginx.conf
]
;
then
if
[
-f
./nginx.conf
]
;
then
...
...
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