Using Jekyll In Docker Ubuntu

Posted by : on

Category : jekyll   docker   ubuntu


Jekyll is static web generator which can be used to generate blog, company profile and etc. Now im gonna show you how to use it in ubuntu inside docker container

1. Prepare the dockerfile

Make a dockerfile

then build the image with the following command

docker build --tag ubuntu-jekyll:latest

2. Run the container

Go to your jekyll folder and run the following command to start the docker container we just created

docker run --name myblog -it -v "$(pwd)":/data1 -p 80:80 myjekyll

3. Using Jekyll

Dont forget to go to your project folder(data1)

cd data1

First you need to install the necessary dependencies by running the following command

bundle install

After that, you can run it locally using this command

bundle exec jekyll serve --host=0.0.0.0 --port=80

to open your web, you can go to 0.0.0.0 or localhost in your browser

I hope that helps you guys, have a nice day!


About Anhar Tasman
Anhar Tasman

Full Stack Developer

Email : tasmananhar@gmail.com

Website :

About Anhar Tasman

With over 5 years of experience in programming, I have successfully developed mobile and web applications for a variety of clients. In my most recent role as Senior Programmer, I have consistently delivered high-quality work, resulting in a 20% increase in client satisfaction within 6 months. Available for new projects in 2 weeks.

Useful Links