05.Docker

이지훈·2024년 5월 7일
0

Docker

목록 보기
5/5
post-thumbnail

docker container run --name oracle ^
-d -p 1521:1521 ^
--network test ^
quay.io/maksymbilenko/oracle-xe-11g

docker container run -d -p 9000:9500 ^
--name web ^
--network test ^
-e "spring.datasource.url=jdbc:oracle:thin:@oracle:1521/xe" ^
-e "spring.datasource.hikari.data-source-properties.oracle.jdbc.timezoneAsRegion=Asia/Seoul" ^
ziru956/security:1.0

docker logs web - 로그 보는 방법

docker container run --name oracle -d -p 1521:1521 --network test quay.io/maksymbilenko/oracle-xe-11g
docker exec -it oracle /bin/bash
#sqlplus system/oracle
SQL> set sqlprompt '_user>'
SQL> GRANT CONNECT, RESOURCE TO boot3 IDENTIFIED BY 1234;
SQL> CONNECT boot3/1234

docker container run --name oracle ^
-d -p 1521:1521 ^
--network test ^
-v c:\docker\oracle:/u01/app/oracle ^
quay.io/maksymbilenko/oracle-xe-11g

docker container run -d -p 9000:9500 ^
--name web ^
--network test ^
-v c:\docker\image:/home/ubuntu/download ^
-e "spring.datasource.url=jdbc:oracle:thin:@oracle:1521/xe" ^
-e "spring.datasource.hikari.data-source-properties.oracle.jdbc.timezoneAsRegion=Asia/Seoul" ^
ziru956/security:1.0

docker container run -d -p 9000:9500 ^
--name web ^
--network test ^
-v "c:\docker\image:/home/ubuntu/download" ^
-v "c:\docker\upload:/home/ubuntu/download/upload" ^
-e "spring.datasource.url=jdbc:oracle:thin:@oracle:1521/xe" ^
-e "spring.datasource.hikari.data-source-properties.oracle.jdbc.timezoneAsRegion=Asia/Seoul" ^
ziru956/security:1.0

docker-compose.yml 정보

services:

  oracle_service:
    container_name: oracle
    image: quay.io/maksymbilenko/oracle-xe-11g 
    volumes:
      - c:/docker/oracle:/u01/app/oracle
    ports:
      - 1521:1521
    environment:
      TZ: Asia/Seoul
    networks:
      test2:
  web_service:
    container_name: web
    image: ziru956/security:1.0
    ports:
      - 9000:9500
    environment:
      spring.datasource.url: jdbc:oracle:thin:@oracle:1521/xe
      spring.datasource.hikari.data-source-properties.oracle.jdbc.timezoneAsRegion: Asia/Seoul
    networks:
      test2: 
    volumes:
      - c:/docker/image/:/home/ubuntu/download
      - c:/docker/upload:/home/ubuntu/download/upload
    depends_on:
      - oracle_service
      
networks:
  test2:

profile
ziru.log

0개의 댓글