You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-48
Original file line number
Diff line number
Diff line change
@@ -41,58 +41,13 @@ If you are running on Linux it may be necessary to install some additional depen
41
41
42
42
Working from a different OS, or just want to avoid installing dependencies? You can use the provided `Dockerfile` to build a container that will run the site for you if you have [Docker](https://www.docker.com/) installed.
43
43
44
-
Start by build the container:
44
+
You can build and execute the container by running the following commandin the repository:
45
45
46
46
```bash
47
-
docker build -t jekyll-site .
47
+
docker compose up
48
48
```
49
49
50
-
Next, run the container:
51
-
```bash
52
-
docker run -p 4000:4000 --rm -v $(pwd):/usr/src/app jekyll-site
53
-
```
54
-
55
-
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:
56
-
57
-
### Steps for Windows:
58
-
1. **Check Docker Installation**: Ensure Docker is installed and running.
59
-
2. **Adjust Path for Volume Mapping**:
60
-
61
-
- On Windows, replace `$(pwd)` with the full absolute path to your current directory. For example:
62
-
63
-
```bash
64
-
-v C:\path\to\your\site:/usr/src/app
65
-
```
66
-
67
-
### Full Command Example:
68
-
```bash
69
-
docker run -p 4000:4000 --rm -v C:\path\to\your\site:/usr/src/app jekyll-site
70
-
```
71
-
72
-
### Things to Keep in Mind:
73
-
1. **Use PowerShell**:
74
-
- If you are using PowerShell, you can use `${PWD}` for the current directory:
75
-
```bash
76
-
docker run -p 4000:4000 --rm -v ${PWD}:/usr/src/app jekyll-site
77
-
```
78
-
79
-
2. **Enable Docker File Sharing**:
80
-
- If your volume doesn't map correctly, ensure Docker has access to the drive where your project resides. To do this:
81
-
- Open Docker Desktop.
82
-
- Go to *Settings* → *Resources* → *File Sharing*.
83
-
- Add your drive (e.g., `C:`).
84
-
85
-
3. **Run in Command Prompt or PowerShell**:
86
-
- In *Command Prompt*:
87
-
88
-
```bash
89
-
docker run -p 4000:4000 --rm -v C:\path\to\your\site:/usr/src/app jekyll-site
90
-
```
91
-
- In *PowerShell*:
92
-
93
-
```bash
94
-
docker run -p 4000:4000 --rm -v ${PWD}:/usr/src/app jekyll-site
95
-
```
50
+
You should now be able to access the website from `localhost:4000`.
0 commit comments