Closed mrkn closed 1 year ago
Hello,
Thanks for reporting this issue. Unfortunately I cannot reproduce the problem that you are describing.
I am using Docker Desktop 4.17.0 on MacOS and everything works properly (tested again right now).
Did it worked for you before? What OS are you using? Maybe that is a Docker bug on your platform.
Did it worked for you before? What OS are you using? Maybe that is a Docker bug on your platform.
I'm using Ubuntu 20.04. It is my first trial of cuber. I downloaded docker desktop for ubuntu from https://docs.docker.com/desktop/install/ubuntu/
Thanks.
And the contents of my Cuberfile is like below:
app "test-app"
repo "https://github.com/mrkn/test-app.git"
dockerfile "Dockerfile"
image "mrkn/test-app"
kubeconfig "kubeconfig.yaml"
migrate 'rails db:migrate', check: 'rake db:abort_if_pending_migrations'
env "RAILS_ENV", "production"
env "RAILS_MASTER_KEY", "xxxx"
proc :web, "bundle exec rails server -b 0.0.0.0 -p $PORT", scale: 1
My situation is that Cuberfile and Dockerfile is outside of the repository. Do Cuberfile and Dockerfile need to be placed inside the repository?
I can avoid this problem to specify File.expand_path("Dockerfile")
to dockerfile
.
The Cuberfile
is just Ruby, so you can ideally write this if you want (wrong):
dockerfile File.expand_path("Dockerfile")
Or this (correct, because it's a relative path inside the repo):
dockerfile "path/to/Dockerfile"
It shouldn't be necessary in general.
The Dockerfile
is usually part of the application and resides in the same Git repository (usually in the root folder).
The Cuberfile
, on the other hand, can be in the same Git repository or in any another place.
Maybe in your case the problem is that your Dockerfile in not in your Git repository.
Oops, I didn't read the documentation carefully! I've noticed that the following description.
The name (or relative path) of the Dockerfile inside your app repository.
I'm sorry to bother you.
With docker-desktop 4.17.0,
docker build
command couldn't resolve the location of Dockerfile.The execution log is below: