Skip to content

Commit 6beedf1

Browse files
authored
Merge pull request #1 from djanickova/docker-support
Add Docker support
2 parents d3b0c24 + 4f364b9 commit 6beedf1

3 files changed

Lines changed: 65 additions & 1 deletion

File tree

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM --platform=linux/amd64 fedora:41
2+
3+
RUN dnf install -y coreutils sed grep findutils gettext jq curl helm \
4+
&& curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz \
5+
| tar -xz -C /usr/local/bin oc \
6+
&& chmod +x /usr/local/bin/oc \
7+
&& dnf clean all
8+
9+
WORKDIR /app
10+
11+
COPY . /app
12+
13+
RUN chmod +x /app/start.sh
14+
15+
ENTRYPOINT ["bash", "/app/start.sh"]

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ The `/auth` directory is intended to store sensitive configuration files used by
6868

6969
More details about this directory and how to populate it are provided in the plugin specific documentation.
7070

71-
## First Steps
71+
## Running the Scripts
72+
73+
You have two options to run these scripts:
74+
75+
1. **Locally** - Install dependencies (`oc`, `helm`) and run directly
76+
2. **Docker** - Use containerized environment (especially useful for macOS users)
77+
78+
## First Steps (Local Installation)
7279

7380
These scripts are designed to work out-of-the-box with minimal setup. In fact, it's recommended that you start with the default setup to better understand how everything fits together. You can always customize and extend things later.
7481

@@ -118,6 +125,24 @@ Step 6. Access your RHDH instance:
118125

119126
You'll now have a clean, working instance of RHDH that's ready to be enhanced in the next steps
120127

128+
## Alternative: Run with Docker
129+
130+
If you prefer containerized execution, use this instead of the local installation above:
131+
132+
- Prereqs: Docker, `.env` configured (see Steps 3–4 from local installation).
133+
- First time setup:
134+
135+
```bash
136+
docker compose build
137+
docker compose up rhdh-start
138+
```
139+
140+
- Teardown when done:
141+
142+
```bash
143+
docker compose up rhdh-teardown
144+
```
145+
121146
## Next Steps
122147

123148
So, you now have a running RHDH (Red Hat Developer Hub) instance, great! But this base setup is just the foundation. To transform it into a useful demo or testing environment, here are some next steps to take:

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
x-rhdh-base: &rhdh-base
2+
build:
3+
context: .
4+
dockerfile: Dockerfile
5+
platform: linux/amd64
6+
volumes:
7+
- .:/app
8+
- auth-cluster-secrets:/app/auth/cluster-secrets
9+
- ~/.kube:/root/.kube
10+
- ~/.helm:/root/.helm
11+
stdin_open: true
12+
tty: true
13+
14+
services:
15+
rhdh-start:
16+
<<: *rhdh-base
17+
entrypoint: ["bash", "/app/start.sh"]
18+
19+
rhdh-teardown:
20+
<<: *rhdh-base
21+
entrypoint: ["bash", "/app/teardown.sh"]
22+
23+
volumes:
24+
auth-cluster-secrets:

0 commit comments

Comments
 (0)