During docker image build we have a requirement to change directory. I know there is a solution to set the path of the Dockerfile, but being in the Operation team we are not allowed to make any change in Dockerfile to adjust the relative path in the docker file. While using the docker plugin, is there any way we can change the path to set the context for docker build.
the docker plugin has a context attribute
kind: pipeline name: default steps: - name: docker image: plugins/docker settings: username: kevinbacon password: pa55word repo: foo/bar tags: latest context: path/in/repo
Thanks so much for quick reply. I am gonna try this out.
@bradrydzewski Thanks it worked for me.