File tree 4 files changed +21
-19
lines changed
4 files changed +21
-19
lines changed Original file line number Diff line number Diff line change 1
1
# Base 이미지로 OpenJDK 17 설정
2
- FROM openjdk:17-alpine
2
+ FROM openjdk:23-ea- 17-jdk-bullseye
3
3
4
4
# 작업 디렉토리 설정
5
5
WORKDIR /app
6
6
7
7
# 필요한 파일 복사
8
8
COPY ./build/libs/*-SNAPSHOT.jar /app/algofi.jar
9
9
10
- # 필요한 패키지 설치
11
- RUN apk add --no-cache gcc g++ make python3 py3-pip nodejs npm
10
+ # 필요한 패키지 설치 및 정리
11
+ RUN apt-get update && \
12
+ apt-get install -y --no-install-recommends gcc g++ make python3 python3-pip nodejs npm && \
13
+ apt-get clean && \
14
+ rm -rf /var/lib/apt/lists/*
12
15
13
16
# 9000 포트를 외부에 노출
14
17
EXPOSE 9000
Original file line number Diff line number Diff line change 1
- # Base 이미지로 OpenJDK 17 Alpine 설정
2
- FROM openjdk:17-alpine
1
+ # arm64, amd64 모두 지원
2
+ FROM openjdk:23-ea- 17-jdk-bullseye
3
3
4
4
# 작업 디렉토리 설정
5
5
WORKDIR /app
Original file line number Diff line number Diff line change 1
- # MySQL 8.0 버전을 베이스 이미지로 사용
2
- # fedora 계열의 Oracle Linux 이미지를 사용하
3
- FROM mysql:8.0
1
+ # fedora 계열의 Oracle Linux 이미지를 사용
2
+ # arm64, amd64 모두 지원
3
+ FROM mysql:oraclelinux9
4
4
5
5
# 사용자 정의 설정 파일을 /etc/my.cnf.d로 복사
6
6
# 이 디렉토리에 파일을 넣으면 MySQL이 자동으로 이 설정 파일을 읽게 됩니다.
7
- COPY ./config/mysql.cnf /etc/my.cnf
8
- RUN chmod 644 /etc/my.cnf
7
+ # COPY ./config/mysql.cnf /etc/my.cnf
8
+ # RUN chmod 644 /etc/my.cnf
9
+ COPY ./config/mysql.cnf /etc/my.cnf.d/my.cnf
10
+ RUN chmod 644 /etc/my.cnf.d/my.cnf
9
11
10
12
# init 파일을 /docker-entrypoint-initdb.d/로 복사
11
13
# 이 디렉토리에 있는 SQL 스크립트는 컨테이너가 처음 실행 시 자동 실행됨
12
14
COPY ./init/create_table.sql /docker-entrypoint-initdb.d/
13
15
COPY ./init/insert_data.sql /docker-entrypoint-initdb.d/
14
-
15
- RUN chmod 755 /docker-entrypoint-initdb.d/create_table.sql
16
- RUN chmod 755 /docker-entrypoint-initdb.d/insert_data.sql
16
+ RUN chmod 755 /docker-entrypoint-initdb.d/*.sql
17
17
18
18
# 환경변수로 MySQL 계정 정보 설정
19
19
ENV MYSQL_ROOT_PASSWORD=mypassword
20
20
ENV MYSQL_USER=myuser
21
21
ENV MYSQL_PASSWORD=mypassword
22
22
ENV MYSQL_DATABASE=mydb
23
23
24
-
25
24
# MySQL이 사용하는 3306 포트를 노출
26
25
EXPOSE 3306
27
26
Original file line number Diff line number Diff line change 1
- version : ' 3 '
1
+ version : " 3.8 "
2
2
services :
3
3
algofi-mysql :
4
4
build : ./algofi-mysql
@@ -11,7 +11,7 @@ services:
11
11
deploy :
12
12
resources :
13
13
limits :
14
- cpus : ' 1 '
14
+ cpus : " 1 "
15
15
memory : 256M
16
16
restart : always
17
17
@@ -27,7 +27,7 @@ services:
27
27
deploy :
28
28
resources :
29
29
limits :
30
- cpus : ' 1.5'
30
+ cpus : " 1.5"
31
31
memory : 512M
32
32
restart : on-failure
33
33
@@ -39,9 +39,9 @@ services:
39
39
deploy :
40
40
resources :
41
41
limits :
42
- cpus : ' 1.5'
42
+ cpus : " 1.5"
43
43
memory : 512M
44
44
restart : on-failure
45
45
46
46
volumes :
47
- mydata:
47
+ mydata :
You can’t perform that action at this time.
0 commit comments