Skip to content

Commit d9c74fc

Browse files
Merge pull request #702 from softlayer/docker
Docker support
2 parents eef0592 + 8d26632 commit d9c74fc

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM icr.io/ibm/alpine
2+
RUN mkdir -p /home/sldn/html
3+
COPY ./ /home/sldn
4+
WORKDIR "/home/sldn"
5+
EXPOSE 1313
6+
RUN ./bin/hugo -d html -b http://localhost:1313
7+
WORKDIR "/home/sldn/html"
8+
RUN apk add mini_httpd
9+
RUN chown minihttpd /home/sldn/html
10+
CMD mini_httpd -C "/home/sldn/min_http.conf" -D -l stdout

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ Commit and push your changes, merge to master, and wait a few minutes.
6464
- `config.toml` The main config for Hugo
6565

6666

67+
## Docker
68+
69+
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.
70+
71+
```bash
72+
# To be able to pull from IBM private registry
73+
$> ibmcloud cr login --client podman
74+
$> podman build . -t sldn:20250526
75+
$> podman run -p 1313:1313 sldn:20250526
76+
```
77+
Site will be available on `http://localhost:1313`
78+
6779
## Making Changes.
6880

6981
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.

min_http.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## do not leave empty lines in here!
2+
#host=www.example.org
3+
port=1313
4+
user=minihttpd
5+
dir=/home/sldn/html
6+
nochroot

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
click
2+
requests

0 commit comments

Comments
 (0)