This repository has been archived by the owner on Oct 14, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
275dece
commit 0a63d95
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.git | ||
.tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Docker image for poliastro development | ||
FROM python:3.7 | ||
LABEL maintainer="Juan Luis Cano Rodríguez <hello@juanlu.space>" | ||
|
||
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/ | ||
ENV VIRTUAL_ENV=/opt/venv | ||
RUN python -m venv ${VIRTUAL_ENV} | ||
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" | ||
|
||
RUN python -m pip install -U pip setuptools | ||
RUN python -m pip install flit pygments wheel | ||
|
||
WORKDIR /code | ||
|
||
# Unfortunately this will invalidate the cache | ||
# for every code change | ||
# Wouldn't it be nice to have a flit compile | ||
# that freezes a requirements.txt? | ||
COPY . /code | ||
|
||
ENV FLIT_ROOT_INSTALL=1 | ||
RUN flit install --symlink --extras dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
DOCKER_BASE_IMAGE := "poliastro:dev" | ||
DOCKER_CONTAINER_NAME := "poliastro-dev" | ||
|
||
|
||
image: Dockerfile pyproject.toml | ||
docker build \ | ||
-t poliastro:dev \ | ||
. | ||
|
||
docker: | ||
docker run \ | ||
-it \ | ||
--rm \ | ||
--name ${DOCKER_CONTAINER_NAME} \ | ||
--volume $(shell pwd):/code \ | ||
--user $(shell id -u):$(shell id -g) \ | ||
${DOCKER_BASE_IMAGE} \ | ||
bash | ||
|
||
.PHONY: docker image |