compose icon indicating copy to clipboard operation
compose copied to clipboard

Fig build fails in folders with names containing capital letters

Open nonsensery opened this issue 12 years ago • 9 comments

Steps to Reproduce

  1. Create a folder named "FigTest".

  2. Add a Dockerfile:

    FROM ubuntu:14.04
    
  3. Add a fig.yml:

    app:
      build: .
    
  4. Run fig build.

Expected Result

A container image would be built from the current directory.

Actual Result

Operation fails with an error from Docker: "Invalid repository name (FigTest_app), only [a-z0-9-_.] are allowed"

Discussion

It looks like Docker image names do not allow uppercase letters. Fig creates the image name from the name of the directory, with some processing to remove invalid characters, but it does not convert uppercase letters to lowercase.

nonsensery avatar Nov 17 '14 19:11 nonsensery

Yep, see #541.

aanand avatar Nov 18 '14 10:11 aanand

As a simple workaround, would it make sense to allow the --project-name flag be set in the fig.yml file? The failure happens in the default case because Fig tries to name its containers based on the directory name, but if we can store a different name, that would be helpful (and save me from typing fig -p foobar run ...) each time.

totallymike avatar Dec 03 '14 14:12 totallymike

Yes, that would be awesome, see #45

I'm just waiting on the docker format to stabilize, then I'd like to add support for it to fig.

dnephin avatar Dec 03 '14 15:12 dnephin

Update on this? Kind of annoying! :)

lwansbrough avatar Jan 09 '15 04:01 lwansbrough

@lwansbrough Indeed.

shihshen avatar Jan 10 '15 07:01 shihshen

+1 :cake:

sethherr avatar Jan 15 '15 19:01 sethherr

+1 Also, apparently if you change the name of the folder from capital to lowercase there are times were fig still chooses the capital version for some reason. That part may be unique to my setup, but it's super annoying.

danroberts avatar Feb 07 '15 19:02 danroberts

Closed by https://github.com/docker/fig/pull/568

aanand avatar Feb 24 '15 20:02 aanand

Anyone experiencing this issue is encouraged to give Compose 1.1.0 RC2 a try! https://github.com/docker/fig/releases/tag/1.1.0-rc2

aanand avatar Feb 24 '15 20:02 aanand