From 4eac8f4d637f09d41ab523208568917e5444202c Mon Sep 17 00:00:00 2001 From: Benny Mei Date: Wed, 20 Jul 2022 14:22:58 -0400 Subject: add Dockerfile and basic docs --- Dockerfile | 18 ++++++++++++++++++ README.md | 11 ++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 Dockerfile 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 diff --git a/README.md b/README.md index c65e1ee..d2d2950 100644 --- a/README.md +++ b/README.md @@ -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 +``` -- cgit v1.2.3