diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..ded7f4f446 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM icr.io/ibm/alpine +RUN mkdir -p /home/sldn/html +COPY ./ /home/sldn +WORKDIR "/home/sldn" +EXPOSE 1313 +RUN ./bin/hugo -d html -b http://localhost:1313 +WORKDIR "/home/sldn/html" +RUN apk add mini_httpd +RUN chown minihttpd /home/sldn/html +CMD mini_httpd -C "/home/sldn/min_http.conf" -D -l stdout \ No newline at end of file diff --git a/README.md b/README.md index 44ec5cec7b..03ebafe94b 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,18 @@ Commit and push your changes, merge to master, and wait a few minutes. - `config.toml` The main config for Hugo +## Docker + +I version SLDN by dates, so I keep the dates in the container tag, you can change `20250526` to `latest` or whatever when building locally. + +```bash +# To be able to pull from IBM private registry +$> ibmcloud cr login --client podman +$> podman build . -t sldn:20250526 +$> podman run -p 1313:1313 sldn:20250526 +``` +Site will be available on `http://localhost:1313` + ## Making Changes. Files in the /content/reference section are automatically generated and shouldn't be modified by hand. Otherwise, simply creating a pull request for changes is usually sufficient. See the [CONTRIBUTING](https://github.com/softlayer/githubio_source/blob/master/CONTRIBUTING.md) guide for more specific details. diff --git a/min_http.conf b/min_http.conf new file mode 100644 index 0000000000..a1edc4c8ea --- /dev/null +++ b/min_http.conf @@ -0,0 +1,6 @@ +## do not leave empty lines in here! +#host=www.example.org +port=1313 +user=minihttpd +dir=/home/sldn/html +nochroot \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..a3b688d000 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +click +requests \ No newline at end of file