[Docker] 도커로 환경을 옮긴 후 셀레니움이 실행이 안되는 오류 해결

2025. 4. 24. 10:23·Develop/Trouble Shooting
반응형

 

 

 

 

SessionNotCreatedException: Could not start a new session Possible causes are invalid address of the remote server or browser start-up failure.

 


 

도커에 대한 이해도가 떨어졌다..

 

도커는 컨테이너 개념인데 

당연히 구글 크롬이 설치가 안되어 있는데

드라이버로 실행하려 하니 발생한 문제.. 😓

 

FROM eclipse-temurin:17-jdk

# Chrome 설치에 필요한 패키지와 라이브러리 설치
RUN apt-get update && apt-get install -y \
    wget curl gnupg2 unzip fonts-liberation \
    libglib2.0-0 libnss3 libgconf-2-4 libxi6 libgbm1 libgtk-3-0 libx11-6 x11-utils

# Chrome만 설치 (WebDriverManager가 chromedriver는 Java에서 자동 설치)
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
    sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list' && \
    apt-get update && \
    apt-get install -y google-chrome-stable && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

ENV TZ=Asia/Seoul LANG=ko_KR.UTF-8

# 현재 디렉토리에 있는 jar 복사
COPY credit-*.jar /app.jar

ENTRYPOINT ["java", "-jar", "/app.jar"]

 

 

반응형
저작자표시 비영리 (새창열림)

'Develop > Trouble Shooting' 카테고리의 다른 글

[SpringBoot] When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins... 어쩌고저쩌고.. 오류 해결하기 🤔  (9) 2025.04.17
API 동시성 문제 개선하기 (MAX + 1 Key 채번)😡  (6) 2025.02.04
[Request processing failed: org.springframework.jdbc.UncategorizedSQLException: Error attempting to get column '컬럼명' from result set. Cause: java.sql.SQLException: 부적합한 열 유형: getBLOB not implemented for class oracle.jdbc.driver.T4CLongRawAccessor 오류 해결 하  (9) 2024.10.28
uncategorized SQLException; SQL state [99999]; error code [17056]; 지원되지 않는 문자 집합(클래스 경로에 orai18n.jar 추가): KO16KSC5601 에러 해결 방법! 🛠️  (2) 2024.08.30
'Develop/Trouble Shooting' 카테고리의 다른 글
  • [SpringBoot] When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins... 어쩌고저쩌고.. 오류 해결하기 🤔
  • API 동시성 문제 개선하기 (MAX + 1 Key 채번)😡
  • [Request processing failed: org.springframework.jdbc.UncategorizedSQLException: Error attempting to get column '컬럼명' from result set. Cause: java.sql.SQLException: 부적합한 열 유형: getBLOB not implemented for class oracle.jdbc.driver.T4CLongRawAccessor 오류 해결 하
  • uncategorized SQLException; SQL state [99999]; error code [17056]; 지원되지 않는 문자 집합(클래스 경로에 orai18n.jar 추가): KO16KSC5601 에러 해결 방법! 🛠️
    반응형
  • 개발자는어디까지공부해야할까?
  • 전체
    오늘
    어제
    • 분류 전체보기 (51)
      • 인디해커 (1)
      • Develop (42)
        • Front-End (7)
        • Back-End (17)
        • Spring (1)
        • Tool (1)
        • DATABASE (1)
        • DevOps (7)
        • CS (3)
        • Trouble Shooting (5)
      • 다이소 (1)
        • 코딩테스트문제풀이 (1)
      • 변소 (7)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

    • 깃허브(Github)
    • 개발 Feed
  • 공지사항

  • 인기 글

  • 태그

    backend
    fow.kr
    Oracle
    JavaScript
    백엔드 개발자 면접 단골 질문 뿌시기
    spring
    op.gg
    리그오브레전드
    node
    백엔드
    react-router-dom
    Java
    SpringBoot
    React
    롤
    jdk
    리액트
    개발자 면접
    spring boot
    스프링부트
    thymeleaf
    lol
    @Scheduled
    타임리프 사용방법
    개발자
    Recoil
    github
    mybatis
    자바
    셀레니움
  • 최근 댓글

  • 최근 글

  • 01-23 10:09
  • hELLO· Designed By정상우.v4.10.3
[Docker] 도커로 환경을 옮긴 후 셀레니움이 실행이 안되는 오류 해결
상단으로

티스토리툴바