Skip to content

Commit eea819f

Browse files
authored
[Cloud Run] Add region tags for tutorial (GoogleCloudPlatform#1641)
* Add region tags for tutorial * fix styling * update dockerfile
1 parent b84878b commit eea819f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

run/hello-broken/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ RUN mvn compile assembly:single
3131
FROM adoptopenjdk/openjdk11:alpine
3232

3333
# Copy the jar to the production image from the builder stage.
34-
COPY --from=builder /app/target/hello-broken-*dependencies.jar /hello-broken.jar
34+
COPY --from=builder /app/target/hello-*dependencies.jar /service.jar
3535

3636
# Run the web service on container startup.
37-
CMD ["java","-jar","/hello-broken.jar"]
37+
CMD ["java","-jar","/service.jar"]
3838
# [END run_broken_dockerfile]

run/hello-broken/pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ limitations under the License.
2727
</parent>
2828
<properties>
2929
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
30-
<maven.compiler.source>11</maven.compiler.source>
3130
<maven.compiler.target>11</maven.compiler.target>
31+
<maven.compiler.source>11</maven.compiler.source>
3232
</properties>
3333
<dependencies>
34+
<!-- [START run_broken_service_dep] -->
3435
<dependency>
3536
<groupId>com.sparkjava</groupId>
3637
<artifactId>spark-core</artifactId>
@@ -51,6 +52,7 @@ limitations under the License.
5152
<artifactId>slf4j-simple</artifactId>
5253
<version>1.6.4</version>
5354
</dependency>
55+
<!-- [END run_broken_service_dep] -->
5456
<dependency>
5557
<groupId>junit</groupId>
5658
<artifactId>junit</artifactId>
@@ -64,11 +66,16 @@ limitations under the License.
6466
<scope>test</scope>
6567
</dependency>
6668
</dependencies>
69+
<!-- [START run_broken_service_build] -->
6770
<build>
6871
<plugins>
6972
<plugin>
7073
<artifactId>maven-compiler-plugin</artifactId>
7174
<version>3.8.0</version>
75+
<configuration>
76+
<source>11</source>
77+
<target>11</target>
78+
</configuration>
7279
</plugin>
7380
<plugin>
7481
<artifactId>maven-assembly-plugin</artifactId>
@@ -85,4 +92,5 @@ limitations under the License.
8592
</plugin>
8693
</plugins>
8794
</build>
95+
<!-- [END run_broken_service_build] -->
8896
</project>

0 commit comments

Comments
 (0)