Skip to content

Commit b56e952

Browse files
committed
chore: update Dockerfile (arm64, amd64 support)
1 parent 4a9686d commit b56e952

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

algofi-compile/Dockerfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Base 이미지로 OpenJDK 17 설정
2-
FROM openjdk:17-alpine
2+
FROM openjdk:23-ea-17-jdk-bullseye
33

44
# 작업 디렉토리 설정
55
WORKDIR /app
66

77
# 필요한 파일 복사
88
COPY ./build/libs/*-SNAPSHOT.jar /app/algofi.jar
99

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/*
1215

1316
# 9000 포트를 외부에 노출
1417
EXPOSE 9000

algofi-core/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Base 이미지로 OpenJDK 17 Alpine 설정
2-
FROM openjdk:17-alpine
1+
# arm64, amd64 모두 지원
2+
FROM openjdk:23-ea-17-jdk-bullseye
33

44
# 작업 디렉토리 설정
55
WORKDIR /app

algofi-mysql/Dockerfile

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
# MySQL 8.0 버전을 베이스 이미지로 사용
2-
# fedora 계열의 Oracle Linux 이미지를 사용하
3-
FROM mysql:8.0
1+
# fedora 계열의 Oracle Linux 이미지를 사용
2+
# arm64, amd64 모두 지원
3+
FROM mysql:oraclelinux9
44

55
# 사용자 정의 설정 파일을 /etc/my.cnf.d로 복사
66
# 이 디렉토리에 파일을 넣으면 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
911

1012
# init 파일을 /docker-entrypoint-initdb.d/로 복사
1113
# 이 디렉토리에 있는 SQL 스크립트는 컨테이너가 처음 실행 시 자동 실행됨
1214
COPY ./init/create_table.sql /docker-entrypoint-initdb.d/
1315
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
1717

1818
# 환경변수로 MySQL 계정 정보 설정
1919
ENV MYSQL_ROOT_PASSWORD=mypassword
2020
ENV MYSQL_USER=myuser
2121
ENV MYSQL_PASSWORD=mypassword
2222
ENV MYSQL_DATABASE=mydb
2323

24-
2524
# MySQL이 사용하는 3306 포트를 노출
2625
EXPOSE 3306
2726

docker-compose.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '3'
1+
version: "3.8"
22
services:
33
algofi-mysql:
44
build: ./algofi-mysql
@@ -11,7 +11,7 @@ services:
1111
deploy:
1212
resources:
1313
limits:
14-
cpus: '1'
14+
cpus: "1"
1515
memory: 256M
1616
restart: always
1717

@@ -27,7 +27,7 @@ services:
2727
deploy:
2828
resources:
2929
limits:
30-
cpus: '1.5'
30+
cpus: "1.5"
3131
memory: 512M
3232
restart: on-failure
3333

@@ -39,9 +39,9 @@ services:
3939
deploy:
4040
resources:
4141
limits:
42-
cpus: '1.5'
42+
cpus: "1.5"
4343
memory: 512M
4444
restart: on-failure
4545

4646
volumes:
47-
mydata:
47+
mydata:

0 commit comments

Comments
 (0)