mserranom / bbrun

Run Bitbucket Pipelines locally
MIT License
203 stars 32 forks source link

Specify custom WORKDIR ? #12

Closed pcate-fls closed 6 years ago

pcate-fls commented 6 years ago

First off, thank you for your work creating this tools, it's made debugging BB pipelines locally so much easier.

I noticed that the working directory always seems to be /ws even if a different one is specified in the Dockerfile WORKDIR. Is there a command line flag or other option that can be setting to specific this?

I appreciate any help you can give me.

mserranom commented 6 years ago

You're right, it will use /ws regardless of the Dockerfile configuration.

We need to define the working directory at docker run time, since we need to mount the filesystem in the container. Potentially we could add a command line option to change the working directory, such as:

bbrun --work-dir /my_work_dir

Any thoughts?

pcate-fls commented 6 years ago

That looks good to me!

mserranom commented 6 years ago

Created PR, @pcate-fls feel free to have a look