Skip to content

Commit 9750513

Browse files
Numbering and indents of the steps showing how to build and push the Docker image.
1 parent 4fe4534 commit 9750513

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

articles/spring-apps/migration/migrate-to-azure-container-apps-components-gateway.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -194,38 +194,38 @@ After the Spring Cloud Gateway configuration is ready, build the image using Azu
194194

195195
To build and push the Docker image, use the following steps:
196196

197-
In the Spring Cloud Gateway project directory, create a **Dockerfile** with the following contents:
197+
1. In the Spring Cloud Gateway project directory, create a **Dockerfile** with the following contents:
198198

199-
```dockerfile
200-
FROM mcr.microsoft.com/openjdk/jdk:17-mariner as build
201-
WORKDIR /staging
202-
# Install gradle
203-
RUN tdnf install -y wget unzip
199+
```dockerfile
200+
FROM mcr.microsoft.com/openjdk/jdk:17-mariner as build
201+
WORKDIR /staging
202+
# Install gradle
203+
RUN tdnf install -y wget unzip
204204
205-
RUN wget https://services.gradle.org/distributions/gradle-8.8-bin.zip && \
206-
unzip -d /opt/gradle gradle-8.8-bin.zip && \
207-
chmod +x /opt/gradle/gradle-8.8/bin/gradle
205+
RUN wget https://services.gradle.org/distributions/gradle-8.8-bin.zip && \
206+
unzip -d /opt/gradle gradle-8.8-bin.zip && \
207+
chmod +x /opt/gradle/gradle-8.8/bin/gradle
208208
209-
ENV GRADLE_HOME=/opt/gradle/gradle-8.8
210-
ENV PATH=$PATH:$GRADLE_HOME/bin
209+
ENV GRADLE_HOME=/opt/gradle/gradle-8.8
210+
ENV PATH=$PATH:$GRADLE_HOME/bin
211211
212-
COPY . .
212+
COPY . .
213213
214-
# Compile with gradle
215-
RUN gradle build -x test
214+
# Compile with gradle
215+
RUN gradle build -x test
216216
217-
FROM mcr.microsoft.com/openjdk/jdk:17-mariner as runtime
217+
FROM mcr.microsoft.com/openjdk/jdk:17-mariner as runtime
218218
219-
WORKDIR /app
219+
WORKDIR /app
220220
221-
COPY --from=build /staging/build/libs/gateway-0.0.1-SNAPSHOT.jar .
221+
COPY --from=build /staging/build/libs/gateway-0.0.1-SNAPSHOT.jar .
222222
223-
ENTRYPOINT ["java", "-jar", "gateway-0.0.1-SNAPSHOT.jar"]
224-
```
223+
ENTRYPOINT ["java", "-jar", "gateway-0.0.1-SNAPSHOT.jar"]
224+
```
225225

226-
Alternatively, see the [ACME Fitness Store sample Dockerfile](https://github.com/Azure-Samples/acme-fitness-store/blob/Azure/azure-kubernetes-service/resources/gateway/gateway/Dockerfile) for guidance.
226+
Alternatively, see the [ACME Fitness Store sample Dockerfile](https://github.com/Azure-Samples/acme-fitness-store/blob/Azure/azure-kubernetes-service/resources/gateway/gateway/Dockerfile) for guidance.
227227

228-
Use the following commands to build the image of the gateway:
228+
1. Use the following commands to build the image of the gateway:
229229

230230
```azurecli
231231
az acr login --name <azure-container-registry-name>
@@ -236,7 +236,7 @@ Use the following commands to build the image of the gateway:
236236
--file Dockerfile .
237237
```
238238

239-
Ensure the gateway image is created, and get the image tag, which ues the following format: `<azure-container-registry-name>.azurecr.io/gateway:acrbuild-spring-cloud-gateway-0.0.1-SNAPSHOT`.
239+
1. Ensure the gateway image is created, and get the image tag, which uses the following format: `<azure-container-registry-name>.azurecr.io/gateway:acrbuild-spring-cloud-gateway-0.0.1-SNAPSHOT`.
240240

241241
### Deploy the image in Azure Container Apps
242242

0 commit comments

Comments
 (0)