|
1 | | -# Labspace starter |
| 1 | +# Labspace - Container Getting Started |
2 | 2 |
|
3 | | -This repository is intended to server as a template to help bootstrap a new Labspace. |
| 3 | +Learn Docker fundamentals by running containers, exploring the container lifecycle, and packaging a real Node.js app into your own custom image. |
4 | 4 |
|
5 | | -## Instructions |
| 5 | +## What You'll Do |
6 | 6 |
|
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 | +- Run your first container |
| 8 | +- Build your first container image |
| 9 | +- Run that newly created container image |
| 10 | +- Push the new image to Docker Hub to share with others |
8 | 11 |
|
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. |
| 12 | +## Launch the Labspace |
10 | 13 |
|
11 | | -2. Clone your newly created repo to your local machine |
| 14 | +To launch the Labspace, run the following command: |
12 | 15 |
|
13 | | -3. Start the local development mode: |
| 16 | +```bash |
| 17 | +docker compose -f oci://dockersamples/labspace-container-getting-started up -d |
| 18 | +``` |
14 | 19 |
|
15 | | - ```bash |
16 | | - # On Mac/Linux |
17 | | - CONTENT_PATH=$PWD docker compose up --watch |
| 20 | +And then open your browser to http://localhost:3030. |
18 | 21 |
|
19 | | - # On Windows with PowerShell |
20 | | - $Env:CONTENT_PATH = (Get-Location).Path; docker compose up --watch |
21 | | - ``` |
22 | | - |
23 | | -4. Update the `labspace/labspace.yaml` with your Labspace's title and description |
| 22 | +### Using the Docker Desktop extension |
24 | 23 |
|
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! |
| 24 | +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-container-getting-started&title=Container%20getting%20started) to launch the Labspace. |
26 | 25 |
|
27 | | - Add any supporting application files or resources directly into the Labspace. This repo will be cloned into the Labspace at startup. |
28 | | -
|
29 | | - Be sure to check out the [docs](https://github.com/dockersamples/labspace-infra/tree/main/docs) for additional information and guidelines. |
| 26 | +## Contributing |
30 | 27 |
|
| 28 | +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. |
31 | 29 |
|
| 30 | +**Important note:** If you fork it, you will need to update the GHA workflow to point to your own Hub repo. |
32 | 31 |
|
33 | | -### Setting up the deployment pipeline |
| 32 | +1. Clone this repo |
34 | 33 |
|
35 | | -The template repo contains a workflow file to make it easy to publish your Labspace. |
| 34 | +2. Start the Labspace in content development mode: |
36 | 35 |
|
37 | | -1. Add GitHub Action Secrets in your new repo for the following: |
| 36 | + ```bash |
| 37 | + # On Mac/Linux |
| 38 | + CONTENT_PATH=$PWD docker compose up --watch |
38 | 39 |
|
39 | | - - `DOCKERHUB_USERNAME` - the username to authenticate to Docker Hub with |
40 | | - - `DOCKERHUB_TOKEN` - a personal or organization access token to use for authentication |
| 40 | + # On Windows with PowerShell |
| 41 | + $Env:CONTENT_PATH = (Get-Location).Path; docker compose up --watch |
| 42 | + ``` |
41 | 43 |
|
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. |
| 44 | +3. Open the Labspace at http://dockerlabs.xyz. |
43 | 45 |
|
44 | | -3. Rename the workflow file to remove the `.temp` extension. |
| 46 | +4. Make the necessary changes and validate they appear as you expect in the Labspace |
45 | 47 |
|
46 | | - ```bash |
47 | | - mv .github/workflows/publish-labspace.yaml.temp .github/workflows/publish-labspace.yaml |
48 | | - ``` |
| 48 | + Be sure to check out the [docs](https://github.com/dockersamples/labspace-infra/tree/main/docs) for additional information and guidelines. |
0 commit comments