惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
Schneier on Security
Schneier on Security
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
A
About on SuperTechFans
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
V
Visual Studio Blog
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
Scott Helme
Scott Helme
H
Heimdal Security Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Vulnerabilities – Threatpost
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Troy Hunt's Blog
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Jina AI
Jina AI
S
Securelist
小众软件
小众软件
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
AWS News Blog
AWS News Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
量子位

Livid

Installing Jekyll on macOS Ventura 20210531 20210531 Jekyll in 2021 DOSBox Pure RetroArch Ecosia MacBook Pro 2019 16-inch Dark Mode Gran Turismo Sport
用 Docker 运行 Jekyll
Livid · 2018-12-31 · via Livid

很喜欢 Jekyll 这个静态网站生成框架,这个站就是用 Jekyll 做的。但是总感觉 Jekyll 的安装是一件很麻烦的事情。直接安装到 Host OS 上是一种污染环境的方法,而我又不想去花时间研究到底怎样才是管理 Ruby 依赖包的最科学的方式。所以用 Docker 来让这个网站可以在本地跑起来,是最好的方式了。而且 Docker 这样的方式也通吃 macOS 和 Windows。

首先是获取 Jekyll 的最新 Docker 镜像:

docker pull jekyll/jekyll

然后切换到你的 Jekyll 网站所在目录,执行这条命令启动 Jekyll:

docker run --mount type=bind,source=$(pwd),target=/srv/jekyll \
-p 4000:4000 --name blog -it jekyll/jekyll \
jekyll serve

然后就可以通过 localhost:4000 访问到这个 Jekyll 的动态生成结果了。

因为我们给这个 Container 赋予了名字 blog,所以之后如果再次需要这个 Container 的话,只需要这样就可以启动:


参考文档 https://github.com/envygeeks/jekyll-docker/blob/master/README.md