Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
0543e779
Verified
Commit
0543e779
authored
4 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
[Docker] use pip legacy resolver
parent
78923ee6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!511
Resolve "[Docker] Provide AlekSIS base image"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+73
-0
73 additions, 0 deletions
Dockerfile
with
73 additions
and
0 deletions
Dockerfile
0 → 100644
+
73
−
0
View file @
0543e779
FROM
python:3.9-buster
AS
core
# Configure Python to be nice inside Docker and pip to stfu
ENV
PYTHONUNBUFFERED 1
ENV
PYTHONDONTWRITEBYTECODE 1
ENV
PIP_DEFAULT_TIMEOUT 100
ENV
PIP_DISABLE_PIP_VERSION_CHECK 1
ENV
PIP_NO_CACHE_DIR 1
ENV
PIP_EXTRA_INDEX_URL https://edugit.org/api/v4/projects/461/packages/pypi/simple
ENV
PIP_USE_DEPRECATED legacy-resolver
# Configure app settings for build and runtime
ENV
ALEKSIS_static__root /usr/share/aleksis/static
ENV
ALEKSIS_media__root /var/lib/aleksis/media
ENV
ALEKSIS_backup__location /var/lib/aleksis/backups
# Install necessary Debian and PyPI packages for build and runtime
RUN
apt-get
-y
update
&&
\
apt-get
-y
install
eatmydata
&&
\
eatmydata apt-get
-y
upgrade
&&
\
eatmydata apt-get
install
-y
--no-install-recommends
\
build-essential
\
gettext
\
libpq5
\
libpq-dev
\
libssl-dev
\
netcat-openbsd
\
yarnpkg
&&
\
eatmydata pip
install
gunicorn django-compressor
# Install extra dependencies
ARG
EXTRAS="ldap"
RUN case
",
$EXTRAS
,"
in
\
(
*
",ldap,"
*
)
\
eatmydata apt-get
install
-y
--no-install-recommends
\
libldap2-dev
\
libsasl2-dev
\
ldap-utils
\
;;
\
esac
# Install core
RUN
set
-e
;
\
mkdir
-p
/var/lib/aleksis/media /usr/share/aleksis/static /var/lib/aleksis/backups
;
\
eatmydata pip
install
AlekSIS-Core
\[
$EXTRAS
\]
# Declare a persistent volume for all data
VOLUME
/var/lib/aleksis
# Define entrypoint and gunicorn running on port 8000
EXPOSE
8000
COPY
docker-entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT
["/usr/local/bin/entrypoint.sh"]
# Install assets
FROM
core
as
assets
RUN
eatmydata aleksis-admin yarn
install
# Clean up build dependencies
FROM
assets
AS
clean
RUN
set
-e
;
\
eatmydata apt-get remove
--purge
-y
\
build-essential
\
gettext
\
libpq-dev
\
libssl-dev
\
libldap2-dev
\
libsasl2-dev
\
yarnpkg
;
\
eatmydata apt-get autoremove
--purge
-y
;
\
apt-get clean
-y
;
\
rm
-f
/var/lib/apt/lists/
*
_
*
;
\
rm
-rf
/root/.cache
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