Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Docs container build #30

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
tasks:
- init: |
pip install -r requirements.txt
./build.sh
echo "done build at $(date)"
command: mkdocs serve

ports:
- port: 8080
name: httpd
visibility: public
onOpen: open-preview

- port: 8000
name: mkdocs
visibility: public
onOpen: open-preview

13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# docker build --no-cache --progress=plain -t okd_io .
# docker run --rm -it -p 80:80 okd_io

FROM registry.fedoraproject.org/fedora:38 as builder
RUN bash -c "dnf install -y python3-pip git"
COPY . /usr/src/okd.io
RUN bash -c "cd /usr/src/okd.io && pip install -r requirements.txt && ./build.sh"

FROM registry.fedoraproject.org/fedora:38
RUN bash -c "dnf install -y httpd"
COPY --from=builder /usr/src/okd.io/public /var/www/html/
EXPOSE 80
CMD ["httpd", "-DFOREGROUND"]
5 changes: 5 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -ex

docker build --no-cache --progress=plain -t okd_io .
docker run --rm -it -p 8080:80 okd_io