docker-plugin icon indicating copy to clipboard operation
docker-plugin copied to clipboard

Add possibility to have a custom named Dockerfile

Open lars-m-leadec opened this issue 2 years ago • 2 comments

What feature do you want to see added?

We have a project setup that needs a seperate Dockerfile. We have a Dockerfile and a file called db.dockerfile.

With docker build there is a possibility to have a custom named Dockerfile "docker build -f customnamedDockerfile ."

See https://docs.docker.com/engine/reference/commandline/build/#file)

It would be nice to have that option in your plugin.

Upstream changes

No response

lars-m-leadec avatar Nov 14 '23 10:11 lars-m-leadec

Indeed that would be useful.

Since the Dockerfile might be in a parent directory or subdirectory, it would be nice to be able to specify the full relative path for it.

Also, docker build can specify a "context" to build from (by default the current directory:

docker build -f db.dockerfile .

Indicated by the . Dot here) When giving the possibility to the user to run docker build with non-default directory layouts, why not also add an option to specify the build context directory?

timtrense-leadec avatar Nov 14 '23 11:11 timtrense-leadec