Skip to content

Commit ba8628b

Browse files
add rust to docker init (#17625)
Signed-off-by: Craig Osterhout <[email protected]>
1 parent 68be421 commit ba8628b

File tree

1 file changed

+38
-14
lines changed

1 file changed

+38
-14
lines changed

Diff for: _data/init-cli/docker_init.yaml

+38-14
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ long: |-
2020
After running `docker init`, you can choose one of the following templates:
2121
2222
* Go: Suitable for a Go server application.
23-
* Python: Suitable for a Python server application.
2423
* Node: Suitable for a Node server application.
24+
* Python: Suitable for a Python server application.
25+
* Rust: Suitable for a Rust server application.
2526
* Other: General purpose starting point for containerizing your application.
2627
2728
After `docker init` has completed, you may need to modify the created files and tailor them to your project. Visit the following topics to learn more about the files:
@@ -70,11 +71,12 @@ examples: |-
7071
> Go - (detected) suitable for a Go server application
7172
Python - suitable for a Python server application
7273
Node - suitable for a Node server application
74+
Rust - suitable for a Rust server application
7375
Other - general purpose starting point for containerizing your application
7476
Don't see something you need? Let us know!
7577
Quit
7678
```
77-
79+
7880
### Example of selecting Go
7981
8082
The following example shows the prompts that appear after selecting `Go` and example input.
@@ -84,7 +86,7 @@ examples: |-
8486
? What version of Go do you want to use? 1.20
8587
? What's the relative directory (with a leading .) of your main package? .
8688
? What port does your server listen on? 3333
87-
89+
8890
CREATED: .dockerignore
8991
CREATED: Dockerfile
9092
CREATED: compose.yaml
@@ -98,8 +100,34 @@ examples: |-
98100
Your application will be available at http://localhost:3333
99101
```
100102
103+
### Example of selecting Node
104+
105+
The following example shows the prompts that appear after selecting `Node` and example input.
106+
107+
```console
108+
? What application platform does your project use? Node
109+
? What version of Node do you want to use? 18
110+
? Which package manager do you want to use? yarn
111+
? Do you want to run "yarn run build" before starting your server? Yes
112+
? What directory is your build output to? (comma-separate if multiple) output
113+
? What command do you want to use to start the app? node index.js
114+
? What port does your server listen on? 8000
115+
116+
CREATED: .dockerignore
117+
CREATED: Dockerfile
118+
CREATED: compose.yaml
119+
120+
✔ Your Docker files are ready!
121+
122+
Take a moment to review them and tailor them to your application.
123+
124+
When you're ready, start your application by running: docker compose up --build
125+
126+
Your application will be available at http://localhost:8000
127+
```
128+
101129
### Example of selecting Python
102-
130+
103131
The following example shows the prompts that appear after selecting `Python` and example input.
104132
105133
```console
@@ -121,19 +149,15 @@ examples: |-
121149
Your application will be available at http://localhost:8000
122150
```
123151
124-
### Example of selecting Node
152+
### Example of selecting Rust
125153
126-
The following example shows the prompts that appear after selecting `Node` and example input.
154+
The following example shows the prompts that appear after selecting `Rust` and example input.
127155
128156
```console
129-
? What application platform does your project use? Node
130-
? What version of Node do you want to use? 18
131-
? Which package manager do you want to use? yarn
132-
? Do you want to run "yarn run build" before starting your server? Yes
133-
? What directory is your build output to? (comma-separate if multiple) output
134-
? What command do you want to use to start the app? node index.js
157+
? What application platform does your project use? Rust
158+
? What version of Rust do you want to use? 1.70.0
135159
? What port does your server listen on? 8000
136-
160+
137161
CREATED: .dockerignore
138162
CREATED: Dockerfile
139163
CREATED: compose.yaml
@@ -143,7 +167,7 @@ examples: |-
143167
Take a moment to review them and tailor them to your application.
144168
145169
When you're ready, start your application by running: docker compose up --build
146-
170+
147171
Your application will be available at http://localhost:8000
148172
```
149173

0 commit comments

Comments
 (0)