Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix makefile build/run under Mac #15

Closed
wants to merge 4 commits into from
Closed

Conversation

svanoort
Copy link
Member

This is due to a subtle difference between the Linux and Mac 'date' command version which breaks the makefile. This fixes it.

It also fixes explicitly setting an ip address that may not match for docker-machine hosts vs. native docker.

@reviewbybees esp @jglick

@ghost
Copy link

ghost commented Jan 12, 2017

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@@ -1,6 +1,6 @@
TAG=$(shell date -I -u)
TAG=$(shell date -u +"%Y-%m-%dT%H-%M-%S")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this produces e.g.

2017-01-12T19-11-56

whereas I wanted e.g.

2017-01-12

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why that specific format for the date, but I changed it

IMAGE=jenkinsci/workflow-demo
DOCKER_RUN=docker run --rm -p 127.0.0.1:2222:2222 -p 127.0.0.1:8080:8080 -p 127.0.0.1:8081:8081 -p 127.0.0.1:9418:9418 -ti
DOCKER_RUN=docker run --rm -p 2222:2222 -p 8080:8080 -p 8081:8081 -p 9418:9418 -ti
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this would make the demo unsafe to run on public WiFi.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jglick How do you propose to make the demo runnable on Mac, then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a solution - not the prettiest but it will get the job done.

This keeps security while allowing docker-machine compatibility
@svanoort
Copy link
Member Author

Ugh, nevermind, the docker info still doesn't distinguish between the local and remote servers for IP.

I can't find a good way to detect a local vs. a docker-machine docker server.

@svanoort
Copy link
Member Author

svanoort commented Feb 1, 2017

Closing this because I'm pretty sure there's not a way to make this handle docker-machine vs. native correctly.

@svanoort svanoort closed this Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants