-
Notifications
You must be signed in to change notification settings - Fork 664
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
Conversation
@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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
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. |
Right now @mattstratton is otherwise occupied and will get back to this when he's able. |
@bridgetkromhout Do you have an ETA or is this more of an open-ended thing? |
I'm getting married on 10/1. I will be back at "work" by 10/6. |
I'm going to go ahead and merge this since it's just the one script, and it seems to work... |
Fixes #1063