From 62ed23d549598223d222c817461b0874be409d14 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Mon, 26 May 2025 18:47:18 +0530 Subject: [PATCH 1/4] Added a docker file to run SLDN on --- Dockerfile | 10 ++++++++++ min_http.conf | 6 ++++++ requirements.txt | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 Dockerfile create mode 100644 min_http.conf create mode 100644 requirements.txt 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/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 From 623cdd1ed23778447f3f0d20a1e59c2df12b3c30 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Mon, 26 May 2025 18:49:39 +0530 Subject: [PATCH 2/4] updated readme --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 44ec5cec7b..35f0ad44eb 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,16 @@ 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 +$> podman build . -t sldn:20250526 +$> podman run -p 1313:1313 sldn:20250526 +``` +Site will be availble 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. From a705db63736883bca728486b4c897c183cd5c679 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Mon, 26 May 2025 18:50:48 +0530 Subject: [PATCH 3/4] updated readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 35f0ad44eb..b0631f8795 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,8 @@ Commit and push your changes, merge to master, and wait a few minutes. 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 ``` From 8d26632ed4b54e7457c016c15e54ae639a98c172 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Mon, 26 May 2025 18:52:03 +0530 Subject: [PATCH 4/4] updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0631f8795..03ebafe94b 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ $> ibmcloud cr login --client podman $> podman build . -t sldn:20250526 $> podman run -p 1313:1313 sldn:20250526 ``` -Site will be availble on `http://localhost:1313` +Site will be available on `http://localhost:1313` ## Making Changes.