You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-apps/java-containers-intro.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ By containerizing your Java applications, you get consistent environments, simpl
30
30
31
31
Containers package applications with their dependencies, ensuring consistency across environments. For Java developers, this means bundling the application, its dependencies, the Java Runtime Environment/Java Development Kit (JRE/JDK), and the configuration files into a single, portable unit.
32
32
33
-
Containerization has key advantages over virtualization that makes it ideal for cloud development. In contrast to a virtual machine, a container runs on a server's host OS kernel. This is beneficial for Java applications, which already run in the Java virtual machine (JVM). Containerizing Java applications adds minimal overhead while providing significant deployment benefits.
33
+
Containerization has key advantages over virtualization that makes it ideal for cloud development. In contrast to a virtual machine, a container runs on a server's host OS kernel. This is beneficial for Java applications, which already run in the Java virtual machine (JVM). Containerizing Java applications adds minimal overhead and provides significant deployment benefits.
34
34
35
35
The container ecosystem includes the following key components:
36
36
@@ -66,9 +66,9 @@ docker compose version
66
66
67
67
### Configure Visual Studio Code for container development
68
68
69
-
For Java development in containers, configure Visual Studio Code by installing the Java Extension Pack and setting up your JDK. The Dev Containers extension enables you to open any folder inside a container and use Visual Studio Code's full feature set while inside that container.
69
+
For Java development in containers, configure Visual Studio Code by installing the Java Extension Pack and setting up your JDK. The Dev Containers extension enables you to open any folder inside a container and use Visual Studio Code's full feature set inside that container.
70
70
71
-
Creating a **.devcontainer/devcontainer.json** file in your project allows Visual Studio Code to automatically build and connect to a development container.
71
+
Creating a **.devcontainer/devcontainer.json** file in your project enables Visual Studio Code to automatically build and connect to a development container.
72
72
73
73
For instance, the following example configuration defines a Java build:
74
74
@@ -89,7 +89,7 @@ For instance, the following example configuration defines a Java build:
89
89
}
90
90
```
91
91
92
-
This configuration uses Microsoft's Java development container image, adds essential extensions, and forwards both the application port - `8080` - and the debugging port -`5005`.
92
+
This configuration uses Microsoft's Java development container image, adds essential extensions, and forwards both the application port, `8080`, and the debugging port, `5005`.
93
93
94
94
## Create a Dockerfile
95
95
@@ -106,7 +106,7 @@ Choosing the right base image is crucial. Consider these options:
Containers are meant to execute in various contexts. In this section, you learn a local development flow while using containers.
153
+
Containers are meant to execute in various contexts. In this section, you learn a local development flow for use with containers.
154
154
155
-
### Use Dockers Compose for multi-container applications
155
+
### Use Docker Compose for multi-container applications
156
156
157
157
Most Java applications interact with databases, caches, or other services. Docker Compose helps you define and orchestrate multi-container applications using a simple YAML configuration file.
158
158
@@ -210,7 +210,7 @@ This file has the following characteristics:
210
210
211
211
#### Common Docker Compose commands
212
212
213
-
Once you create your **compose.yml** file, manage your application with the following commands:
213
+
After you create your **compose.yml** file, manage your application by using the following commands:
214
214
215
215
```bash
216
216
# Build images without starting containers
@@ -247,7 +247,7 @@ A typical Java development workflow using Docker Compose contains the following
247
247
1. Make changes to your Java code,
248
248
1. Rebuild your application. Depending on the configuration, you might need to restart your containers.
249
249
1. Test the changes in the containerized environment.
250
-
1. When finished, run `docker compose down`.
250
+
1. When you're finished, run `docker compose down`.
251
251
252
252
### Running single containers with Docker
253
253
@@ -340,7 +340,7 @@ For Java-specific issues, enable the JVM flags for better diagnostics by using t
@@ -405,7 +405,7 @@ Secure your containerized Java applications by using the following practices:
405
405
```
406
406
407
407
- Base image freshness. Keep your base images up to date.
408
-
- Secrets management. Implement proper secrets management. For instance, don't hardcode sensitive data into your application, and use a key vault whenever possible.
408
+
- Secrets management. Implement proper secrets management. For instance, don't hard-code sensitive data into your application, and use a key vault whenever possible.
409
409
- Restricted security contexts. Apply the principle of least privilege to all security contexts.
410
410
- File system access. Use read-only file systems wherever possible.
411
411
@@ -443,7 +443,7 @@ This section guides you through preparing your Java containers for Azure Contain
443
443
444
444
- Probe for health. Implement [health probes](health-probes.md) for Azure's liveness and readiness checks.
445
445
- Log configuration. Configure [logging](logging.md) to output to `stdout`/`stderr`.
446
-
- Plan for the unexpected. Set up proper [graceful shutdown handling](./application-lifecycle-management.md) with time-out configuration.
446
+
- Plan for the unexpected. Set up proper graceful shutdown handling with time-out configuration. For more information, see [Application lifecycle management in Azure Container Apps](./application-lifecycle-management.md).
0 commit comments