๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ์ƒํ™œ/์ด์Šˆ ๋ฐœ์ƒ

A fatal error has been detected by the Java Runtime Environment. Docker Alphine Image Crashed Exception

by cocococo331 2022. 7. 25.

์ด์Šˆ

ํŠน์ • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ์•ŒํŒŒ์ธ ์ด๋ฏธ์ง€ ๋ฏธ์ง€์› ์ด์Šˆ๋กœ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ๋œจ์ž๋งˆ๋‹ค ๋ป—์–ด๋ฒ„๋ฆผ

์›์ธ

google api๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ–ˆ๊ณ , ๋ฒ„์ „ ๊ด€๋ฆฌ๋ฅผ ์ˆ˜์›”ํ•˜๊ฒŒ ํ•˜๋ ค๊ณ  bom์„ ์ถ”๊ฐ€ํ–ˆ๋Š”๋ฐ ์—ฌ๊ธฐ์•ˆ์— ์žˆ๋Š” Library์ค‘์˜ ์ผ๋ถ€๊ฐ€ Alphine ์ด๋ฏธ์ง€๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š์•„์„œ ๋ฐœ์ƒํ•˜๋Š” ์ด์Šˆ

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.google.cloud</groupId>
            <artifactId>libraries-bom</artifactId>
            <version>25.3.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

๋กœ์ปฌ์—์„œ๋Š” ๋ฐœ์ƒํ•˜์ง€ ์•Š์œผ๋ฉฐ, Docker๋กœ ์˜ฌ๋ฆฐ ๊ฐœ๋ฐœ ECS ์ปจํ…Œ์ด๋„ˆ์—์„œ๋งŒ ๋ฐœ์ƒํ–ˆ๋‹ค.

 

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

๊ฐ€์žฅ ๊ฐ„๋‹จํ•˜๊ฒŒ๋Š” ๊ฑ ์ด๋ฏธ์ง€ ๊ต์ฒด

์•ŒํŒŒ์ธ์ด ๊ฐ€๋ฒผ์›Œ์„œ ์ผ๋‹ค์ง€๋งŒ ์•ˆ๋œ๋‹ค๊ธฐ์— ๋‹ค๋ฅธ slimํ•œ ์ด๋ฏธ์ง€๋กœ ๊ต์ฒด
-> ๋„์ปคํŒŒ์ผ ๋‚ด image ์ถ”๊ฐ€ ๋ฐ wget์ด ์•ˆ๋œ๋‹ค๊ธฐ์— ํ•ด๋‹น ๋ช…๋ น์–ด๋„ ์ถ”๊ฐ€ (as-is image : amazoncorretto:8-alpine-jre)

...
FROM openjdk:8-jre-slim

RUN apt-get update && apt-get install -y wget
...

 

์ฐธ๊ณ  

https://github.com/googleapis/google-cloud-java/issues/3536