A Dockerfile for building a pants development image. #4260

Merged
merged 1 commit into from Feb 15, 2017

Conversation

Projects
None yet
6 participants
@benjyw
Contributor

benjyw commented Feb 14, 2017

Useful for chasing down linux-only problems on MacOS.

Note: Required a fix in bootstrap.sh. mktemp requires six X's
at the end of a pattern (at least on Alpine Linux).

A Dockerfile for building a pants development image.
Useful for chasing down linux-only problems on MacOS.

Note: Required a fix in bootstrap.sh. mktemp requires six X's
      at the end of a pattern (at least on Alpine Linux).

@benjyw benjyw requested review from mateor and kwlzn Feb 14, 2017

@kwlzn

kwlzn approved these changes Feb 14, 2017

nice. lgtm!

@JieGhost

This comment has been minimized.

Show comment
Hide comment
@JieGhost

JieGhost Feb 14, 2017

Contributor

Is port binding going to be an issue? pants creates nailgun servers that use certain ports, does it interfere with pants on your host OS?

Update:
Thought about it a little more, and read some docs, the ports inside a container will not be exposed to host OS by default. So it shouldn't be a problem, unless you do crazy things like running a pants daemon in a container while sending a request to it from your host OS :)

Contributor

JieGhost commented Feb 14, 2017

Is port binding going to be an issue? pants creates nailgun servers that use certain ports, does it interfere with pants on your host OS?

Update:
Thought about it a little more, and read some docs, the ports inside a container will not be exposed to host OS by default. So it shouldn't be a problem, unless you do crazy things like running a pants daemon in a container while sending a request to it from your host OS :)

@jsirois

This comment has been minimized.

Show comment
Hide comment
@jsirois

jsirois Feb 14, 2017

Member

Purely for reference - this mounted the local git repo - which is superfast on linux anyway - I think still slow on mac: https://rbcommons.com/s/twitter/r/2842/diff/4#index_header

The main shenanigans ensure the container runs with same uid such that modified files are not owned by root.

Member

jsirois commented Feb 14, 2017

Purely for reference - this mounted the local git repo - which is superfast on linux anyway - I think still slow on mac: https://rbcommons.com/s/twitter/r/2842/diff/4#index_header

The main shenanigans ensure the container runs with same uid such that modified files are not owned by root.

@mateor

mateor approved these changes Feb 14, 2017

@mateor

This comment has been minimized.

Show comment
Hide comment
@mateor

mateor Feb 14, 2017

Member

I am using the mac Docker app and have been very pleased, FWIW

Member

mateor commented Feb 14, 2017

I am using the mac Docker app and have been very pleased, FWIW

@leozc

This comment has been minimized.

Show comment
Hide comment
@benjyw

This comment has been minimized.

Show comment
Hide comment
@benjyw

benjyw Feb 15, 2017

Contributor

@jsirois I didn't know about that one, good reference. My goals were a lot less ambitious though. I just wanted a quick-and-dirty way to reproduce Linux-only issues on MacOS. So this doesn't set up a volume against the local repo, making editing files in the container inconvenient, you run as root in the container etc.

What was that abandoned?

Contributor

benjyw commented Feb 15, 2017

@jsirois I didn't know about that one, good reference. My goals were a lot less ambitious though. I just wanted a quick-and-dirty way to reproduce Linux-only issues on MacOS. So this doesn't set up a volume against the local repo, making editing files in the container inconvenient, you run as root in the container etc.

What was that abandoned?

@benjyw benjyw merged commit 559a1bc into pantsbuild:master Feb 15, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@benjyw benjyw deleted the benjyw:benjy_dockerfile branch Feb 15, 2017

lenucksi added a commit to lenucksi/pants that referenced this pull request Apr 25, 2017

A Dockerfile for building a pants development image. (#4260)
Useful for chasing down linux-only problems on MacOS.

Note: Required a fix in bootstrap.sh. mktemp requires six X's
      at the end of a pattern (at least on Alpine Linux).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment