Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ARG PYVERSION
FROM docker.io/python:${PYVERSION}

ARG VERSION
RUN pip install pipenv=="${VERSION}"
13 changes: 13 additions & 0 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ifneq (,$(wildcard ./.env))
include .env
export
endif


docker-build:
echo $(PYVERSION) $(PIPENV)
docker build -t $(REGISTRY)/$(ORG)/$(IMG):$(TAG) --build-arg PYVERSION=$(PYVERSION) --build-arg VERSION=$(PIPENV) -f Dockerfile .


docker-push:
docker push $(REGISTRY)/$(ORG)/$(IMG):$(TAG)
7 changes: 7 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Public docker images

Build with:

```
$ make docker-build docker-push TAG=3.11-alpine-v2023-6-26 PYVERSION=3.11-alpine PIPENV=2023.6.26
```
5 changes: 2 additions & 3 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ This results in a smaller image, which can still run your application.
Here is an example `Dockerfile`, which you can use as a starting point for
doing a multistage build for your application:

FROM docker.io/python:3.9 AS builder
FROM docker.io/oz123/pipenv:3.11-v2023-6-26 AS builder

RUN pip install --user pipenv

# Tell pipenv to create venv in the current directory
ENV PIPENV_VENV_IN_PROJECT=1
Expand All @@ -37,7 +36,7 @@ doing a multistage build for your application:

RUN /usr/src/.venv/bin/python -c "import requests; print(requests.__version__)"

FROM docker.io/python:3.9 AS runtime
FROM docker.io/python:3.11 AS runtime

RUN mkdir -v /usr/src/.venv

Expand Down