forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile for easy installation on local machine (alshedivat#532)
- Loading branch information
1 parent
844dae2
commit f00be23
Showing
1 changed file
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -450,7 +450,48 @@ If you have a different question, please ask using [Discussions](https://github. | |
|
||
### Installation | ||
|
||
#### Local setup | ||
#### Local setup using Docker (Recommended on Windows) | ||
|
||
You need to do these step to get `al-folio` up and running in your local machine: | ||
|
||
- Install [docker](https://docs.docker.com/get-docker/) | ||
- Clone your repository | ||
|
||
```bash | ||
git clone [email protected]:<your-username>/<your-repo-name>.git | ||
cd <your-repo-name> | ||
``` | ||
|
||
Then you can use Dockerhub prebuilt image to run your website. Note that for the first time it would download an image of size 300MB or so. | ||
|
||
```bash | ||
bin/dockerhub_run.sh | ||
``` | ||
|
||
> Currently, you should opt this method, only if you are using newest version of al-folio. If you are using an old version. You should build your own image. | ||
<details><summary>(click to expand) <strong>Build your own docker image (more advanced):</strong></summary> | ||
|
||
First, download the necessary modules and install them into a docker image called `al-folio:Dockerfile` (this command will build an image which is used to run your website afterwards. Note that you only need to do this step once. After you have the image, you no longer need to do this anymore): | ||
|
||
|
||
\```bash | ||
bin/docker_build_image.sh | ||
\``` | ||
|
||
Run the website! | ||
|
||
\```bash | ||
bin/docker_run.sh | ||
\``` | ||
|
||
> To change port number, you can edit `docker_run.sh` file. | ||
> 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. | ||
</details> | ||
|
||
#### Local Setup (Standard) | ||
|
||
Assuming you have [Ruby](https://www.ruby-lang.org/en/downloads/) and [Bundler](https://bundler.io/) installed on your system (*hint: for ease of managing ruby gems, consider using [rbenv](https://github.com/rbenv/rbenv)*), first [fork](https://guides.github.com/activities/forking/) the theme from `github.com:alshedivat/al-folio` to `github.com:<your-username>/<your-repo-name>` and do the following: | ||
|
||
|