Skip to content

add: docker command related instructions for Windows users #2688

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

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,44 @@ Next, run the container:
docker run -p 4000:4000 --rm -v $(pwd):/usr/src/app jekyll-site
```

To run the `docker run` command on Windows, you need to adjust the syntax for the volume mapping (`-v`) as Windows uses different path formats. Here's how to run your command on Windows:

### Steps for Windows:
1. **Check Docker Installation**: Ensure Docker is installed and running.
2. **Adjust Path for Volume Mapping**:
- On Windows, replace `$(pwd)` with the full absolute path to your current directory. For example:
```bash
-v C:\path\to\your\site:/usr/src/app
```

### Full Command Example:
```bash
docker run -p 4000:4000 --rm -v C:\path\to\your\site:/usr/src/app jekyll-site
```

### Things to Keep in Mind:
1. **Use PowerShell?**:
- If you are using PowerShell, you can use `${PWD}` for the current directory:
```bash
docker run -p 4000:4000 --rm -v ${PWD}:/usr/src/app jekyll-site
```

2. **Enable Docker File Sharing**:
- If your volume doesn't map correctly, ensure Docker has access to the drive where your project resides. To do this:
- Open Docker Desktop.
- Go to *Settings* → *Resources* → *File Sharing*.
- Add your drive (e.g., `C:`).

3. **Run in Command Prompt or PowerShell**:
- In *Command Prompt*:
```bash
docker run -p 4000:4000 --rm -v C:\path\to\your\site:/usr/src/app jekyll-site
```
- In *PowerShell*:
```bash
docker run -p 4000:4000 --rm -v ${PWD}:/usr/src/app jekyll-site
```

# Maintenance

Bug reports and feature requests to the template should be [submitted via GitHub](https://github.com/academicpages/academicpages.github.io/issues/new/choose). For questions concerning how to style the template, please feel free to start a [new discussion on GitHub](https://github.com/academicpages/academicpages.github.io/discussions).
Expand Down