Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
MPAI-Private
MPAI-CAE
arp
ARP Library
Commits
0edb0fa4
Commit
0edb0fa4
authored
Apr 04, 2023
by
Matteo
Browse files
add Docker container
parent
a149914f
Changes
2
Hide whitespace changes
Inline
Side-by-side
.dockerignore
0 → 100644
View file @
0edb0fa4
docs
tests
.editorconfig
.gitignore
.travis.yml
\ No newline at end of file
Dockerfile
0 → 100644
View file @
0edb0fa4
FROM
python:3.10.0
as
python-base
LABEL
maintainer="Matteo Spanio" version="0.1.0"
# https://python-poetry.org/docs#ci-recommendations
ENV
POETRY_VERSION=1.3.1
ENV
POETRY_HOME=/opt/poetry
ENV
POETRY_VENV=/opt/poetry-venv
# Tell Poetry where to place its cache and virtual environment
ENV
POETRY_CACHE_DIR=/opt/.cache
# Create stage for Poetry installation
FROM
python-base
as
poetry-base
# Creating a virtual environment just for poetry and install it with pip
RUN
python3
-m
venv
$POETRY_VENV
\
&&
$POETRY_VENV
/bin/pip
install
-U
pip setuptools
\
&&
$POETRY_VENV
/bin/pip
install
poetry
==
${
POETRY_VERSION
}
# Create a new stage from the base python image
FROM
python-base
as
example-app
# Copy Poetry to app image
COPY
--from=poetry-base ${POETRY_VENV} ${POETRY_VENV}
# Add Poetry to PATH
ENV
PATH="${PATH}:${POETRY_VENV}/bin"
WORKDIR
/app
COPY
. ./
RUN
poetry
install
--no-cache
--only
main
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment