diff options
author | Benny Mei <meibenny@gmail.com> | 2022-07-20 21:22:58 +0300 |
---|---|---|
committer | Benny Mei <meibenny@gmail.com> | 2022-07-20 21:22:58 +0300 |
commit | 4eac8f4d637f09d41ab523208568917e5444202c (patch) | |
tree | fbeae5bfc00b9d11a10197a0a311848bf7bee85f | |
parent | fbc2c66b85f2b542177cda6ee78574c2d22da2d7 (diff) |
add Dockerfile and basic docs
-rw-r--r-- | Dockerfile | 18 | ||||
-rw-r--r-- | README.md | 11 |
2 files changed, 28 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5af4806 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# syntax=docker/dockerfile:1 +FROM klakegg/hugo:0.101.0-ubuntu + +RUN apt-get update +RUN apt-get upgrade -y +RUN apt-get install -y vim + +WORKDIR /code +COPY . /code/elephants +RUN hugo new site example +WORKDIR /code/example/themes +RUN ln -s ../../elephants . +WORKDIR /code/example +RUN echo "theme = \"elephants\"" >> config.toml +WORKDIR /code/example/content/posts +RUN echo "---\ntitle: \"example post\"\ndate: 2022-07-15T00:00:00-05:00\ndraft: false\n---\n\nExample" > my-first-post.md +RUN echo "---\ntitle: \"example tag\"\ndate: 2022-07-20T00:00:00-05:00\ntags: [\"example_tag\"]\ndraft: false\n---\n\nExample" > my-second-post.md +WORKDIR /code @@ -18,4 +18,13 @@ You've helped me through thick and thin. There's no way I would have gotten so far without you. ## License -Released under the MIT License
\ No newline at end of file +Released under the MIT License + +## Docs +### Docker +``` +docker build . -t elephants +docker run -it elephants shell +cd example +hugo server +``` |