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
Add Docker-compose file for windows compatibility (alshedivat#875)
This file makes it easier for windows users to use docker. (Closesalshedivat#829)
Previous to this commit, those who used Windows had to install Ubuntu
inside windows (via WSL) and run our commands. Now they can run it by
just typing `docker-compose up`.
> The main problem was that `./bin/dockerhub_run.sh` command was written
with `Bash` in mind and you had to change it a little bit to make it
compatible with windows `Powershell`. We shouldn't have two scripts.
This is why adding a `docker-compose.yml` file is necessary.
- First, install [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/).
171
171
- Then, clone this repository to your machine:
172
172
173
173
```bash
@@ -178,12 +178,12 @@ $ cd <your-repo-name>
178
178
Finally, run the following command that will pull a pre-built image from DockerHub and will run your website.
179
179
180
180
```bash
181
-
$ ./bin/dockerhub_run.sh
181
+
$ docker-compose up
182
182
```
183
183
184
184
Note that when you run it for the first time, it will download a docker image of size 300MB or so.
185
185
186
-
Now, feel free to customize the theme however you like (don't forget to change the name!). After you are done, you can use the same command (`bin/dockerhub_run.sh`) to render the webpage with all you changes. Also, make sure to commit your final changes.
186
+
Now, feel free to customize the theme however you like (don't forget to change the name!). After you are done, you can use the same command (`docker-compose up`) to render the webpage with all you changes. Also, make sure to commit your final changes.
187
187
188
188
<details><summary>(click to expand) <strong>Build your own docker image (more advanced):</strong></summary>
189
189
@@ -193,18 +193,18 @@ First, download the necessary modules and install them into a docker image calle
193
193
194
194
195
195
```bash
196
-
$ ./bin/docker_build_image.sh
196
+
$ docker-compose -f docker-local.yml build
197
197
```
198
198
199
199
Run the website!
200
200
201
201
```bash
202
-
$ ./bin/docker_run.sh
202
+
$ docker-compose -f docker-local.yml up
203
203
```
204
204
205
-
> To change port number, you can edit `docker_run.sh` file.
205
+
> To change port number, you can edit `docker-compose.yml` file.
206
206
207
-
> If you want to update jekyll, install new ruby packages, etc., all you have to do is build the image again using `docker_build_image.sh`! It will download ruby and jekyll and install all ruby packages again from scratch.
207
+
> If you want to update jekyll, install new ruby packages, etc., all you have to do is build the image again! It will download ruby and jekyll and install all ruby packages again from scratch.
0 commit comments