Docker build image build path not taking effect (OD-994)
Released
Tuuux opened 1 year ago

Context

I run 1dev/server, 1dev/agent and registry2 . I have succes fully build my own Docker Image by use "Execute Commands" But i got trouble with **Build Docker Image **

The Trouble

Impossible to got directories structure inside my project to store differente Dockerfile , in fact the "Build Path" entry have no sense to me.

the famous "." at the end of a "docker build" is not optional and dont mean "./", it make reference of a file call "." in each directory. Then for change the "." context you set "PATH/." (with a . at end)

By exemple:

docker build ./alpine/3.17/.

Summary

I suppose "Build path" is a reference to PATH from docker help build where the default is PATH/Dockerfile. Unfortunally to me, that is not possible to change the "." path (like "./alpine/3/.") and that force me to play with the Dockerfile name , where i prefert juste change the "." location

Proposal

  • Permit to play with the "." location
  • When default PATH/Dockerfile is use generate a "." value like "PATH/."
Robin Shen commented 1 year ago

Thanks for the feedback. Do you mean when property Build Path is specified, OneDev should default dockerfile to be <Build Path>/Dockerfile if property Dockerfile is not specified?

Also if Build Path is specified, can you please let me know why need to append a . after the path? I tested and it does not make any difference.

Robin Shen changed fields 1 year ago
Name Previous Value Current Value
Type
Improvement
Bug
Seen Builds
empty
4516
Robin Shen commented 1 year ago

OK. This is actually a bug, the build path is not taking effect.

Robin Shen changed title 1 year ago
Previous Value Current Value
Docker build image
Docker build image build path not taking effect
OneDev changed state to 'Closed' 1 year ago
Previous Value Current Value
Open
Closed
OneDev commented 1 year ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 1 year ago
Previous Value Current Value
Closed
Released
OneDev commented 1 year ago

State changed as build #3135 is successful

Tuuux commented 1 year ago

thanks to have toake a look, Yes it was look like Build Path take no effect.

But im general i use the final Dot "." for change my working directroy.

Exemple: ./alpine/Dockerfile ./debian/Dockerfile

Without touch Dockerfile name or Build Path, inside my CI/CD i build like that.

docker build ./alpine/.
docker build ./debian/.

in general i just change the Dot context . in ny exemple i can continue to use **-f ** option and plsy with de Build Path.

Brief thanks for you assistance i'll test the version 7.7.14 ASAP.

OneDev will change the world !!!

Regards

Robin Shen commented 1 year ago

With 7.7.14, the behavior will be the same as docker command, ie. just change build path and OneDev will look for Dockerfile under that build path without specifying Dockerfile property.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (4)
Reference
OD-994
Please wait...
Page is in error, reload to recover