Skip to content

Commit 03b12dc

Browse files
committed
docs: update README
1 parent a4a7b6b commit 03b12dc

File tree

1 file changed

+34
-90
lines changed

1 file changed

+34
-90
lines changed

README.md

Lines changed: 34 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,67 @@
1-
## 🎯 A Template for building Docker Guides' Samples Apps
1+
# Docker Build Cloud Cookbook
22

3-
1. [Sample README Content](#sample-readme-content)
4-
- [Project Title](#project-title)
5-
- [Project Structure](#project-structure)
6-
- [Setup Instructions](#setup-instructions)
7-
- [Configuration](#configuration)
8-
2. [Backlinks](#backlinks)
9-
3. [Maintenance Schedule](#maintenance-schedule)
10-
4. [License](#license)
11-
5. [Contributing](#contributing)
12-
13-
14-
15-
16-
This page outlines the requirements for code repositories in the `dockersamples` organization. These repositories are meant to support Docker guides(and NOT blogs) at this point.
17-
If you have any questions, please contact `#docs` on the [Docker Community Slack](https://communityinviter.com/apps/dockercommunity/docker-community).
18-
19-
### PLEASE REMOVE THIS SECTION ONCE YOU CLONE THIS REPO
20-
21-
This section provides instructions for using the template. Please remove this "Samples Repo Templates for Docker Guides" section from the README file after cloning the repository to ensure your guide is clean and tailored to your specific application.
22-
23-
### For New Repository
24-
25-
26-
1. Select **Use this template** and choose **Create a new repository**.
27-
28-
<img width="1144" alt="image" src="https://github.com/user-attachments/assets/d27634f1-1f7e-4e77-bc60-25122467e805">
29-
30-
---
31-
32-
33-
2. Select **dockersamples/docker-guides-template** under Repository Template, select your repository, populate description and choose your preferred repository name.
34-
35-
<img width="725" alt="image" src="https://github.com/user-attachments/assets/8fbc6a38-f6ab-4442-b0ad-51ad01794016">
36-
37-
---
38-
39-
40-
41-
3. Select **Create repository**. Don't forget to populate **About** section with a short description of the project once you create the repository.
42-
43-
### For Existing Repository
44-
45-
1. Copy the [workflow file](.github/workflows/existing-repo.yaml) from our template repository
46-
2. Add it to your repository under `.github/workflows/`
47-
3. Trigger the functionality manually via the Actions tab to update the repo
48-
4. Ensure that you select the right branch (main or master) based on the repo while triggering the workflow run.
49-
50-
51-
## Sample README Content
52-
53-
The README.md describes the purpose of the repository, setup instructions, and related resources.
54-
55-
## Project Title
56-
57-
This repo contains the sample application for developing applications and the Docker guide on Docker Docs. While this project is written primarily in Node/Rust/Java, the focus is on launching and using tool in development and the tool-related pieces can easily be adapted into any other language.
58-
59-
Notice: This sample repo is intended to support the guide mentioned above. As such, the application code is purposely kept simple to keep the focus on the guide's content and should not be considered production-ready.
3+
This repository contains a sample application that demonstrates building a simple Rust web server using Docker Build Cloud. This app is part of a Docker guide showcasing how to leverage Docker Build Cloud for building containerized applications.
604

615
## Project Structure
62-
[Describe the directory structure of the project repository]
636

64-
- **app/** - The main "app" of the project. It listens to events on a Kafka topic and logs them.
65-
- **frontend/** - Contains the frontend part of the application.
66-
- **backend/** - Contains the backend part of the application.
67-
- **database/** - Contains database configuration and scripts.
7+
- **src/** - The main application code for the Rust web server.
8+
- **Dockerfile** - Defines how the Rust app is built and containerized using Docker Build Cloud.
9+
- **build-and-run.sh** - A script that builds and runs the application for local development.
10+
- **.dockerignore** - Specifies files to be ignored when building the Docker image.
11+
- **.github/** - Contains GitHub workflows for CI/CD, including Docker Build Cloud integration.
6812

6913
## Setup Instructions
70-
[Provide clear setup instructions here]
7114

15+
Follow these steps to get the project up and running locally:
7216

7317
### 1. Clone the repository
74-
```bash
75-
git clone https://github.com/your-org/sample-repo.git
76-
```
7718

19+
```bash
20+
git clone https://github.com/dockersamples/build-cloud-cookbook.git
21+
```
7822

7923
### 2. Navigate to the project directory:
8024

25+
```bash
26+
cd build-cloud-cookbook
8127
```
82-
cd sample-repo
28+
29+
### 3. Build and run the application
30+
31+
You can use the provided build-and-run.sh script to build and run the application. This script handles the Docker Build Cloud process and starts the web server on the default address `127.0.0.1:3000`.
32+
33+
```bash
34+
./build-and-run.sh
8335
```
36+
The app will be accessible at `http://127.0.0.1:3000`.
8437

8538
## Configuration
86-
This project requires the following environment variables:
87-
- `DATABASE_URL` - The URL of the database.
88-
- `API_KEY` - API key for third-party services.
89-
90-
Create a `.env` file in the root directory to define these variables.
9139

92-
### 3. Install dependencies for the app, frontend, and backend:
40+
This project uses the following environment variable for configuration:
9341

94-
```
95-
cd app && npm install
96-
cd ../frontend && npm install
97-
cd ../backend && npm install
98-
```
42+
`BIND_ADDR` - The address and port on which the web server will bind (default: `127.0.0.1:3000`).
43+
To override the default value, create a .env file at the root of the project:
9944

100-
### 4. Start the application:
45+
Example .env file:
10146

102-
```
103-
npm start
47+
```makefile
48+
BIND_ADDR=0.0.0.0:8080
10449
```
10550

106-
10751
## Backlinks
108-
For more information, check the related [blog post](link) or [use case guide](https://docs.docker.com/guides/use-case/kafka/).
10952

110-
## Maintenance Schedule
111-
This repo is maintained [frequency]. For any security updates, note that there may be delays in applying recent fixes.
53+
For more information on Docker Build Cloud and how this sample app was built, check out the [Docker Build Cloud documentation](https://docs.docker.com/build-cloud/).
11254

113-
## License
114-
This project is licensed under the [Apache 2.0 License](/LICENSE).
55+
## Maintenance Schedule
11556

116-
## Contributing
57+
This repository is maintained quarterly. Security updates and bug fixes are applied as needed, but expect up to a two-week delay for non-critical updates.
11758

118-
Since this project is intended to support a specific use case guide, contributions are limited to bug fixes or security issues. If you have a question, feel free to open an issue!
59+
## License
11960

61+
This project is licensed under the Apache 2.0 License.
12062

63+
## Contributing
12164

65+
Contributions are welcome for bug fixes and security issues. For feature requests or improvements, feel free to open an issue, but note that major changes may not be prioritized as this repository supports a specific Docker guide.
12266

12367

0 commit comments

Comments
 (0)