Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Loading