Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.2.0 changes how default names treat . in the root directory name #9011

Closed
3 tasks done
olets opened this issue Dec 6, 2021 · 4 comments
Closed
3 tasks done

4.2.0 changes how default names treat . in the root directory name #9011

olets opened this issue Dec 6, 2021 · 4 comments

Comments

@olets
Copy link

olets commented Dec 6, 2021

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: 01CD8A4C-01E1-458E-912A-05926C03A580/20211206201331

Expected behavior

The minor upgrade from 4.1.x to 4.2.0 is non-breaking.

Actual behavior

4.1.x: when determining container name, volume names, and image names, . and anything after it was trimmed

4.2.0 and 4.3.0: when determining container name, volume names, and image names, . is spliced out

# 4.1.x
cd something.com
docker-compose build && docker-compose up # no custom name specified
# container created is called 'something'

# 4.2.0
cd something.com
docker-compose build && docker-compose up # no custom name specified
# container created is called 'somethingcom'

For projects that were already built at the time of the upgrade, the result is errors:

# 4.1.x
cd something.com
docker-compose build && docker-compose up # no custom name specified
# container created is called 'something'
docker-compose down
# upgrade Docker Desktop
docker-compose up # errors because there is no container 'somethingcom'

# start container via Docker Desktop UI. that works as expected, but
docker-compose exec … # errors because there is no container 'somethingcom'

Information

  • macOS Version: 11.6.1 (20G224)
  • Intel chip or Apple chip: Apple
  • Docker Desktop Version: 4.3.0, first appeared in 4.2.0

Steps to reproduce the behavior

  1. Set up a Docker project (I use docker-compose.yml, in case that's relevant). Name the host root directory something with a .
  2. Build and up the app in 4.1.x
  3. Build and up the app in 4.2.0
  4. See that you have two sets of containers, volumes, and images with different names, where the difference is how the . was treated
@olets olets changed the title 4.2.0 changes how default container names deal with . in the root directory name 4.2.0 changes how default names treat . in the root directory name Dec 6, 2021
@stephen-turner stephen-turner transferred this issue from docker/for-mac Dec 7, 2021
@stale
Copy link

stale bot commented Jun 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 12, 2022
@olets
Copy link
Author

olets commented Jun 13, 2022

Bump

@stale
Copy link

stale bot commented Jun 13, 2022

This issue has been automatically marked as not stale anymore due to the recent activity.

@stale stale bot removed the stale label Jun 13, 2022
@laurazard
Copy link
Member

This is expected, and was implemented in compose-spec/compose-go#197 to fix #8881.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants