Skip to content

Commit 3fa3abb

Browse files
feature: Introduce py38 base image and switch to poetry==1.0.0b4 cause of that.
1 parent 3537925 commit 3fa3abb

5 files changed

Lines changed: 44 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.build

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# 3.0.0 (In Development)
2+
3+
## 3.0.0b0 (2019-11-13)
4+
5+
- **Breaking change:** Make `py38` default image
6+
- **Breaking change:** Install `poetry==1.0.0b4` for all images
7+
- **Breaking change:** Use `slim-buster` image for `py35`, `py36`, and `py37`
8+
- Simplify development by introducing `Makefile`
9+
110
# 2.0.0 (2019-10-29)
211

312
- **Breaking change:** By default poetry will create virtualenv, while install

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
FROM python:3.7.5-slim-stretch
1+
FROM python:3.8.0-slim-buster
22

33
LABEL maintainer="Igor Davydenko <iam@igordavydenko.com>"
4-
LABEL description="Add poetry, pre-commit, and other dev-tools to official Python slim stretch Docker image."
4+
LABEL description="Add poetry, pre-commit, and other dev-tools to official Python slim Docker image."
55

66
RUN apt update -qq && apt upgrade -y && apt install -y curl gcc git locales locales-all make nano openssh-client && apt autoremove -y
77

88
ENV PATH="/root/.local/bin:/root/.poetry/bin:${PATH}"
99

1010
RUN pip install pip==19.3.1 pre-commit==1.20.0 tox==3.14.0 virtualenv==16.7.7
1111

12-
ENV POETRY_VERSION=0.12.17
12+
ENV POETRY_VERSION=1.0.0b4
1313
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
1414

1515
WORKDIR /app

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.PHONY: all build deploy run
2+
3+
DOCKER ?= docker
4+
IMAGE ?= playpauseandstop/docker-python
5+
6+
all: build
7+
8+
build: .build
9+
.build: Dockerfile
10+
$(DOCKER) build -t $(IMAGE) .
11+
touch $@
12+
13+
deploy:
14+
ifeq ($(VERSION),)
15+
$(DOCKER) push $(IMAGE):$(VERSION)
16+
else
17+
$(DOCKER) push $(IMAGE)
18+
endif
19+
20+
run: build
21+
$(DOCKER) run --rm -it $(IMAGE) $(CMD)

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/playpauseandstop/docker-python.svg)
44
![Docker Pulls](https://img.shields.io/docker/pulls/playpauseandstop/docker-python.svg)
55

6-
Add poetry, pre-commit, and other dev-tools to official Python slim stretch
7-
Docker image.
6+
Add poetry, pre-commit, and other dev-tools to official Python slim Docker
7+
image.
88

99
## Usage
1010

@@ -16,7 +16,7 @@ FROM playpauseandstop/docker-python
1616

1717
- [pip](https://pip.pypa.io) 19.3.1
1818
- [virtualenv](https://virtualenv.pypa.io) 16.7.7
19-
- [poetry](https://poetry.eustace.io) 0.12.17
19+
- [poetry](https://poetry.eustace.io) 1.0.0b4
2020
- [pre-commit](https://pre-commit.com) 1.20.0
2121
- [tox](https://tox.readthedocs.io/) 3.14.0
2222
- [curl](https://curl.haxx.se) 7.52.1
@@ -35,6 +35,10 @@ other versions supported as well.
3535

3636
List of supported Python versions are (`<PY_VERSION>` -> base Docker image):
3737

38+
#### 3.0.0
39+
40+
- `py38` -> `python:3.8.0-slim-buster`
41+
3842
#### 2.0.0
3943

4044
- `py35` -> `python:3.5.7-slim-stretch`
@@ -73,17 +77,17 @@ FROM playpauseandstop/docker-python:1.0.3-py36
7377
To build an image:
7478

7579
```bash
76-
docker build -t playpauseandstop/docker-python .
80+
make
7781
```
7882

7983
To run something, using given image:
8084

8185
```bash
82-
docker run --rm -it playpauseandstop/docker-python CMD
86+
make CMD="..." run
8387
```
8488

8589
To push image (or specific version):
8690

8791
```bash
88-
docker push playpauseandstop/docker-python:VERSION
92+
make VERSION="..." deploy
8993
```

0 commit comments

Comments
 (0)