Files
distribution_erp/Dockerfile.dev
T
chpark 082042cd6d FITO PLM 프로젝트 설정 및 소스 교체
- DB 연결: 211.115.91.141:11140/fito, postgres/intops0909!!
- 도메인: fito.wace.me
- 소스 교체 (woosung 기반)
- Dockerfile.dev 컴파일 단계 추가
- 로그인 페이지 DH Autoware 스타일 리디자인
- Constants: 회사명 (주)피토/fito, SYSTEM_TITLE FITO PLM
- 헤더 로고 FITO 로고로 변경
- 파비콘 추가
- 관리자 팝업 window.open 공백 이슈 수정

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 18:44:57 +09:00

69 lines
2.1 KiB
Docker

# Multi-stage build for development
# Stage 1: Build stage - compile Java sources
FROM dockerhub.wace.me/tomcat:7.0.94-jre7-alpine.arm64 AS builder
# Install JDK for compilation (JRE image doesn't have javac)
RUN apk add --no-cache openjdk7
# Set working directory
WORKDIR /build
# Copy source code and libraries
COPY src ./src
COPY WebContent ./WebContent
# Create classes directory
RUN mkdir -p WebContent/WEB-INF/classes
# Compile Java sources (include Tomcat servlet API in classpath)
RUN find src -name "*.java" -print0 | xargs -0 javac \
-encoding UTF-8 \
-source 1.7 \
-target 1.7 \
-d WebContent/WEB-INF/classes \
-cp "WebContent/WEB-INF/lib/*:/usr/local/tomcat/lib/*" \
-Xlint:-options \
-Xlint:-deprecation \
-Xlint:-unchecked
# Copy resources (XML, properties files)
RUN find src -type f \( -name "*.xml" -o -name "*.properties" \) | while read -r filepath; do \
relative_path="${filepath#src/}"; \
target_file="WebContent/WEB-INF/classes/$relative_path"; \
mkdir -p "$(dirname "$target_file")"; \
cp "$filepath" "$target_file"; \
done
# Verify compilation
RUN CLASS_COUNT=$(find WebContent/WEB-INF/classes -name "*.class" | wc -l); \
if [ $CLASS_COUNT -eq 0 ]; then \
echo "ERROR: No Java classes were compiled!"; \
exit 1; \
else \
echo "Successfully compiled $CLASS_COUNT Java classes"; \
fi
# Stage 2: Runtime stage
FROM dockerhub.wace.me/tomcat:7.0.94-jre7-alpine.arm64 AS development
# Remove default webapps
RUN rm -rf /usr/local/tomcat/webapps/*
# Copy compiled application from builder stage
COPY --from=builder /build/WebContent /usr/local/tomcat/webapps/ROOT
# Copy source for reference
COPY src /usr/local/tomcat/webapps/ROOT/WEB-INF/src
# Copy custom Tomcat context configuration for JNDI
COPY ./tomcat-conf/context.xml /usr/local/tomcat/conf/context.xml
# Configure Tomcat Connector for UTF-8 URI encoding
RUN sed -i 's/<Connector port="8080"/<Connector port="8080" URIEncoding="UTF-8"/g' /usr/local/tomcat/conf/server.xml
# Expose Tomcat port
EXPOSE 8080
# Start Tomcat
CMD ["catalina.sh", "run"]