Fig build fails in folders with names containing capital letters
Steps to Reproduce
-
Create a folder named "FigTest".
-
Add a Dockerfile:
FROM ubuntu:14.04 -
Add a fig.yml:
app: build: . -
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.
Yep, see #541.
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.
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.
Update on this? Kind of annoying! :)
@lwansbrough Indeed.
+1 :cake:
+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.
Closed by https://github.com/docker/fig/pull/568
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