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

Add powershell script for dockering all the things #1072

Merged
merged 4 commits into from
Oct 24, 2016

Conversation

mattstratton
Copy link
Member

Fixes #1063

@glennsarti
Copy link
Contributor

@mattstratton Unfortunately I am unable to test this PR on DfW due to https://forums.docker.com/t/failed-to-start-vm-mobylinuxvm-the-vm-couldnt-get-an-ip-address-after-60-tries/19551/6

In my opinion this does not fix #1063 . Installing Docker is an extremely heavy handed workaround for a simple backslash/forward slash issue.

@@ -0,0 +1,8 @@
# You will need to make sure you have your C drive (or whatever drive you have the devopsdays code on) shared in Docker

$MyPath = (Get-Item -Path ".\" -Verbose).FullName
Copy link
Contributor

Choose a reason for hiding this comment

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

This will get the path to the current working directory, not the root of the hugo website. Would instead use $MyPath = $PSScriptRoot

Note that $PSScriptRoot is in Powershell 3.0 only, but as Docker for Windows is only supported on Windows 10 this is not an issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

The script is run within the root of the hugo website, so it should work...

Copy link
Contributor

Choose a reason for hiding this comment

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

That's an assumption. You can run that script from any working directory via an absolute path.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you check on the change I just made and see if that looks right now?

@mattstratton
Copy link
Member Author

For now, this is the workaround. We cannot assume that everyone is going to defensively code against the slashes any time they are looking to use them. The workaround is using Docker.

The write-host piece is actually a troubleshooting/debugging thing I put in, and there's no need to keep it in there :) I'll remove that part.

@bridgetkromhout
Copy link
Collaborator

Right now @mattstratton is otherwise occupied and will get back to this when he's able.

@glennsarti
Copy link
Contributor

@bridgetkromhout Do you have an ETA or is this more of an open-ended thing?

@mattstratton
Copy link
Member Author

I'm getting married on 10/1. I will be back at "work" by 10/6.

@mattstratton
Copy link
Member Author

I'm going to go ahead and merge this since it's just the one script, and it seems to work...

@mattstratton mattstratton merged commit 1816ef4 into master Oct 24, 2016
@mattstratton mattstratton deleted the add-docker-posh-script branch October 24, 2016 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants