Skip to content

Commit dcfe55d

Browse files
committed
Update repo to use new labspace content repo layout
1 parent 5aa91b2 commit dcfe55d

16 files changed

Lines changed: 34 additions & 38 deletions

.github/workflows/publish-labspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
password: ${{ secrets.DOCKERHUB_TOKEN }}
2323

2424
- name: Publish Labspace
25-
uses: dockersamples/publish-labspace-action@v1
25+
uses: dockersamples/publish-labspace-action@v2
2626
with:
2727
target_repo: ${{ env.DOCKERHUB_REPO }}

README.md

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,41 @@
1-
# Labspace starter
1+
# DHI Node Labspace
22

3-
This repository is intended to server as a template to help bootstrap a new Labspace.
3+
This lab outlines the benefits of Docker Hardened Images and walks you through the migration process for the Node application.
44

5-
## Instructions
5+
## Launch the Labspace
66

7-
1. Create a new repository using this repo as the template ([docs here](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template)).
7+
To launch the Labspace, run the following command:
88

9-
**NOTE:** After creating the repo, a GHA workflow will run to do some additional bootstrapping. The bootstrapping workflow file will be removed during bootstrapping.
9+
```bash
10+
docker compose -f oci://dockersamples/labspace-dhi-node up -d
11+
```
1012

11-
2. Clone your newly created repo to your local machine
13+
And then open your browser to http://localhost:3030.
1214

13-
3. Start the local development mode:
15+
### Using the Docker Desktop extension
1416

15-
```bash
16-
# On Mac/Linux
17-
CONTENT_PATH=$PWD docker compose -f oci://dockersamples/labspace-content-dev -f .labspace/compose.override.yaml up
18-
19-
# On Windows with PowerShell
20-
$Env:CONTENT_PATH = (Get-Location).Path; docker compose -f oci://dockersamples/labspace-content-dev -f .labspace/compose.override.yaml up
21-
```
22-
23-
4. Update the `labspace.yaml` with your Labspace's title and description
24-
25-
5. Write your Labspace! Being in dev mode, your changes should be visible in the interface without a restart. Feel free to edit either on your host machine or in the Labspace itself!
26-
27-
Add any supporting application files or resources directly into the Labspace. This repo will be cloned into the Labspace at startup.
17+
If you have the Labspace extension installed (`docker extension install dockersamples/labspace-extension` if not), you can also [click this link](https://open.docker.com/dashboard/extension-tab?extensionId=dockersamples/labspace-extension&location=dockersamples/labspace-dhi-node&title=DHI%20Node) to launch the Labspace.
2818

29-
Be sure to check out the [docs](https://github.com/dockersamples/labspace-infra/tree/main/docs) for additional information and guidelines.
19+
## Contributing
3020

21+
If you find something wrong or something that needs to be updated, feel free to submit a PR. If you want to make a larger change, feel free to fork the repo into your own repository.
3122

23+
**Important note:** If you fork it, you will need to update the GHA workflow to point to your own Hub repo.
3224

33-
### Setting up the deployment pipeline
25+
1. Clone this repo
3426

35-
The template repo contains a workflow file to make it easy to publish your Labspace.
27+
2. Start the Labspace in content development mode:
3628

37-
1. Add GitHub Action Secrets in your new repo for the following:
29+
```bash
30+
# On Mac/Linux
31+
CONTENT_PATH=$PWD docker compose up --watch
3832

39-
- `DOCKERHUB_USERNAME` - the username to authenticate to Docker Hub with
40-
- `DOCKERHUB_TOKEN` - a personal or organization access token to use for authentication
33+
# On Windows with PowerShell
34+
$Env:CONTENT_PATH = (Get-Location).Path; docker compose up --watch
35+
```
4136

42-
2. In the `.github/workflows/publish-labspace.yaml.temp` file, update the `DOCKERHUB_REPO` with the name of the Docker Hub repo you want to publish to.
37+
3. Open the Labspace at http://dockerlabs.xyz.
4338

44-
3. Rename the workflow file to remove the `.temp` extension.
39+
4. Make the necessary changes and validate they appear as you expect in the Labspace
4540

46-
```bash
47-
mv .github/workflows/publish-labspace.yaml.temp .github/workflows/publish-labspace.yaml
48-
```
41+
Be sure to check out the [docs](https://github.com/dockersamples/labspace-infra/tree/main/docs) for additional information and guidelines.

compose.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include:
2+
- oci://dockersamples/labspace-content-dev
3+
- ./compose.override.yaml
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Go to the [Node DHI page](https://hub.docker.com/orgs/$$orgname$$/hardened-images/catalog/dhi/node) and click on the `Mirror to repository` button.
66

77
In the opened pop-up set the name of the destination repository to `dhi-node`
8-
![Mirror Node DHI](.labspace/images/mirror-node.png)
8+
![Mirror Node DHI](images/mirror-node.png)
99

1010
Click on Mirror. In a few minutes you'll see all available Node DHI tags in your `dhi-node` repository in the Docker Hub. Mirrored repositories work like any other repository in your Docker Hub organization.
1111

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)