Skip to content

Commit

Permalink
Update DJANGO_IMAGE_NAME to use dash instead of underscore
Browse files Browse the repository at this point in the history
Docker changed the behaviour of the container naming to use `-`. Originally we
believed that this change was reverted in 2.9.0 as it caused a breaking change.
But it turns out instead they reverted it only for related resources such as
networks, volumes, secrets and config.

This means that going forward the container names use dashes (`-`).

Note: Also updated the poetry wrapper image name to match this new convention.

Refs:

- https://docs.docker.com/compose/release-notes/#290
- docker/compose#9700
- docker/compose#9700 (comment)
- compose-spec/compose-go#297
- Internal ref: https://thorgate.slack.com/archives/C02AMG235/p1659433239011469

Additional changes in the PR:

- Update poetry installation command
  - ref: https://python-poetry.org/docs/master/#installing-with-the-official-installer
- Remove pypi docker compose in ci image (docker-compose now comes from inside docker image anyway)
  • Loading branch information
IncrePrior committed Aug 5, 2022
1 parent 07e0a3a commit be4819d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions utils/Dockerfile-base-ci
Expand Up @@ -13,6 +13,5 @@ RUN pip3 install -U pip 'pipenv>=2020.6.2' setuptools wheel

ENV POETRY_HOME "$HOME/.poetry"
ENV POETRY_NO_INTERACTION 1
RUN wget https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py && \
python3 get-poetry.py
RUN wget -O - -o /dev/null https://install.python-poetry.org | python3 -
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
5 changes: 2 additions & 3 deletions utils/Dockerfile-ci
Expand Up @@ -5,10 +5,9 @@ RUN apk update && \
apk add python3 python3-dev build-base libffi-dev openssl-dev git bash rust cargo && \
apk add yq --repository http://dl-3.alpinelinux.org/alpine/edge/community/
RUN python3 -m ensurepip
RUN pip3 install docker-compose

ENV POETRY_HOME "$HOME/.poetry"
ENV POETRY_NO_INTERACTION 1
RUN wget https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py && \
python3 get-poetry.py

RUN wget -O - -o /dev/null https://install.python-poetry.org | python3 -
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
4 changes: 2 additions & 2 deletions {{cookiecutter.repo_name}}/Makefile
Expand Up @@ -19,8 +19,8 @@ PROJECT_ROOT ?= $(CURDIR)
SITE_ROOT ?= $(PROJECT_ROOT)/$(PROJECT_NAME)

CUR_DIR_NAME ?= $(shell basename `pwd`)
DJANGO_IMAGE_NAME ?= $(CUR_DIR_NAME)_django
POETRY_WRAPPER_IMAGE_NAME ?= $(PROJECT_NAME)_poetry_wrapper
DJANGO_IMAGE_NAME ?= $(CUR_DIR_NAME)-django
POETRY_WRAPPER_IMAGE_NAME ?= $(PROJECT_NAME)-poetry-wrapper

# - {%- if cookiecutter.frontend_style == SPA %}
JS_COBERTURA="app/coverage/cobertura-coverage.xml"
Expand Down

0 comments on commit be4819d

Please sign in to comment.