You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a project with a custom Dockerfile.
If I update the Dockerfile without updating docker-compose.yml and run sudo podman-compose up --build then the new image is built, but it doesn't replace the current container with one using the new image. Instead it prints the warning
Error: creating container storage: the container name "test_podman_compose_python_1" is already in use by 6cbc30b3bcd7130e7dbaf63fdeab8c8652b09385ec39c5035ff6bbd3a03abdf6. You have to remove that container to be able to reuse that name: that name is already in use, or use --replace to instruct Podman to do so.
To Reproduce
A directory with the following three files is sufficient: docker-compose.yml:
services:
python:
build: .
command: python -m pip list
Dockerfile:
# pull official base image
FROM docker.io/python:alpine3.20
# install python dependencies
RUN pip install --upgrade pip
# RUN pip install numpy # <-- uncomment this
# copy entrypoint.sh
COPY ./entrypoint.sh /usr/local/bin/
RUN sed -i "s/\r$//g" /usr/local/bin/entrypoint.sh \
&& chmod +x /usr/local/bin/entrypoint.sh
# run entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
entrypoint.sh:
#!/bin/sh
exec "$@"
You should then
Run sudo podman-compose up --build
Uncomment # RUN pip install numpy # <-- uncomment this
Describe the bug
I have a project with a custom
Dockerfile
.If I update the
Dockerfile
without updatingdocker-compose.yml
and runsudo podman-compose up --build
then the new image is built, but it doesn't replace the current container with one using the new image. Instead it prints the warningTo Reproduce
A directory with the following three files is sufficient:
docker-compose.yml
:Dockerfile
:entrypoint.sh
:You should then
sudo podman-compose up --build
# RUN pip install numpy # <-- uncomment this
sudo podman-compose up --build
Expected behavior
It should print
followed by
NOTE: This is the current behaviour of
docker-compose
.Actual behavior
It prints
followed by
Environment:
The text was updated successfully, but these errors were encountered: