[ The imperialist Japanese military must officially acknowledge and apologize for the coercion of young women into sexual slaves. / 幼い女性を性の奴隷にした帝國主義日本軍の?制性を公式に認め、謝罪しなければならない. ]

사용자

ID:
PW:

INDEX
01.게시판
게시판 [72]
02.File Book
File 자료실 [96]
Site Link [14]
개인폴더 [200]
03.Field Book
Altibase [19]
Tibero [30]
MS-SQL [28]
MySQL [47]
DB2 [79]
ORACLE [3099]
PSQL [135]
CUBRID [5]
기타정보 [170]
운영체제 [613]
04.Q/A Book
Q/A [53]
05.방명록
방명록 [54]
레벨업 [37]
구인/구직 [2]

기념일
Search
LINK
+ 가족 Hompy
+ DNSEver
IOTN :: Field Book :: 운영체제

 회원가입

Docker 시작
최길호 [LIST]   2020-07-06 00:34:47, 조회 : 443

https://subicura.com/2017/01/19/docker-guide-for-beginners-1.html [ 개념 ]
https://subicura.com/2017/01/19/docker-guide-for-beginners-2.html [ 실습 ]
https://docs.docker.com/engine/installation/
https://docs.docker.com/docker-for-mac
https://docs.docker.com/docker-for-windows

추가
--name                  # Container name
--hostname              # Container host name
--shm-size=10g          # Shared Memory
--cpus=2                # Number of CPUs
--cpuset-cpus=0         # 0번 CPU를 전용으로 사용
--cpuset-cpus="0,1"     # 0,1 두개만 사용
--cpuset-cpus="0-2"     # 1~3번째 3개 CPU를 사용
--memory="10g"          # 메모리 제한
--memory-swap="30g"     # 메모리(10g) + swap(20g) 용량

docker update --cpus=2 --memory=20G --memory-swap=40G ol7
docker inspect --format='{{json .Config}}' ol7
docker inspect --format='{{.LogPath}}' ol7
docker inspect ol7 | grep -i path
docker inspect ol7 | grep -i log
docker inspect ol7 | grep -i cpu
docker inspect ol7 | grep -i mem
docker inspect ol7 | grep -i vol

docker diff ol7   # 변경 ( added,deleted,changed ) 정보 확인


추가
docker run -it --rm centos:latest bash
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
systemctl start docker
docker info | grep htt
Registry: https://index.docker.io/v1/
어떤걸 받을수 있는지 list를 확인 가능.
web:
https://index.docker.io/_/centos
https://index.docker.io/_/ubuntu
https://index.docker.io/_/oraclelinux
+ https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
https://index.docker.io/_/postgres
https://index.docker.io/_/mysql
https://index.docker.io/_/mariadb
https://index.docker.io/_/httpd
https://index.docker.io/_/php
https://index.docker.io/_/ruby

docker pull store/oracle/database-instantclient:12.2.0.1

docker run -it --rm centos:7 bash
[root@4a9f13cd0629 /]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)

docker run -it --rm mysql-enterprise-server bash

docker login': denied: requested access to the resource is denied
$ docker login
사용자 계정 만들고 로그인 진행 하면 받을수 있다.
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: gilhoxxxx
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
docker run -it --rm store/oracle/database-instantclient:12.2.0.1 sqlplus hr/welcome@example.com/pdborcl
docker run -it --rm store/oracle/database-instantclient:12.2.0.1 sqlplus /nolog
docker pull store/oracle/database-enterprise:12.2.0.1
docker run -d -it --name db12 store/oracle/database-enterprise:12.2.0.1
sys pwd: Oradoc_db1

docker exec -it db12 bash -c "source /home/oracle/.bashrc;sh"
docker exec -it db12 bash -c "source /home/oracle/.bashrc;sqlplus '/as sysdba'"







요약
curl -fsSL https://get.docker.com/ | sudo sh
or
yum -y install docker docker-registry
systemctl enable docker.service

adduser -u 980 -g docker docker
passwd docker
systemctl start docker
docker version
docker run --help
docker run ubuntu:16.04
docker run --rm -it ubuntu:16.04 /bin/bash
docker run -d -p 1234:6379 redis
telnet localhost 1234
docker run -d -p 3306:3306 \
   -e MYSQL_ALLOW_EMPTY_PASSWORD=true \
   --name mysql \
   mysql:5.7
mysql -h 127.0.0.1 -uroot
create database wp CHARACTER SET utf8;
grant all privileges on wp.* to wp@'%' identified by 'wp';
docker run -d -p 8080:80 \
   --link mysql:mysql \
   -e WORDPRESS_DB_HOST=mysql \
   -e WORDPRESS_DB_NAME=wp \
   -e WORDPRESS_DB_USER=wp \
   -e WORDPRESS_DB_PASSWORD=wp \
   wordpress
http://192.168.101.111:8080
docker run -d -p 8888:8888 -p 6006:6006 teamlab/pydata-tensorflow:0.1
http://192.168.101.111:8888
docker ps
docker ps -a
docker ps -a -q -f status=exited
docker rm -v $(docker ps -a -q -f status=exited)
docker pull ubuntu:14.04
docker pull centos
docker images
docker rmi 7bdf5d7e0191

-- 컨테이너 재시작
--rm 종료 되면 자동 삭제 된다. 적업 했던게 모두 삭제 된다.
docker run --rm -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root --name mysql be0dbf01a0f3
-- 삭제 하지 않고 종료/시작 해보자.
docker run -d -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=true --name mysql be0dbf01a0f3
f8e767bf361b245baa0afa28bc8061e9a77f9addee8a9fc0cadb81e627feed33
docker ps -a
docker stop f8
docker start f8e767bf361b

-- 먼테이너 로그
docker ps
f8-----------
docker logs f8
docker logs --tail 10 f8

docker logs -f f8 ## 종료는 Ctrl+C

-- 컨테이너 로그인
[docker@node1 ~]$ docker exec -it mysql /bin/bash
root@f8e767bf361b:/# mysql
mysql>
[docker@node1 ~]$ docker exec -it mysql mysql -uroot
[docker@node1 ~]$ docker exec -it mysql mysql
mysql>
alter user root identified with mysql_native_password by 'root';
select @@datadir;
+-----------------+
| @@datadir       |
+-----------------+
| /var/lib/mysql/ |
+-----------------+

-- 컨테이너 <--> main OS volume mount 
-- 컨테이너는 삭제 되어도 main 서버 volume 데이터는 바로 사용 가능.
-- /data/mysql 자동 생성 [ file owner = polkitd:input ]

docker run -d -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=true --name mysql -v /data/mysql:/var/lib/mysql be0dbf01a0f3

docker exec -it mysql /bin/bash
or
docker exec -it  xxxx /bin/bash
mysql
alter user root identified with mysql_native_password by 'root';
create database webdb;
create user webdb identified with mysql_native_password by 'webdb';
grant all privileges on webdb.* to webdb;

docker stop mysql

-- docker-compose 활용한 실행 방법
curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

mkdir ~/docker
cat > ~/docker/docker-compose.yml
version: '2'

services:
   db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: wordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     volumes:
       - wp_data:/var/www/html
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_PASSWORD: wordpress
volumes:
    db_data:
    wp_data:


cd ~/docker
docker-compose up

3.238.121.7


  LIST

제목 작성자 작성일 조회
UNIX  find arch -newer scp    최길호 2020/09/07 400
Windows  cmd copy 파일 하나로 만들기 [ 80개 html 파일들 찾아서 합쳐서 단일 html 파일로 생성 ]    최길호 2020/08/27 342
Windows  windows 10 usb    최길호 2020/08/22 314
Linux  centos5 / yum install / Loading mirror speeds from cached hostfile YumRepo Error: All mirror URLs are not using ftp, http[s] or file.    최길호 2020/08/18 565
Docker  Docker for windows 시작~ [ Tutorial docker push ]    최길호 2020/07/27 11188
Linux  SecureCRT, putty terminal,session title 변경 [ echo -ne "\033]0;${USER}@${HOSTNAME}\007" ]    최길호 2020/07/18 479
Docker  docker save / load    최길호 2020/07/18 424
Docker  su: cannot open session: Permission denied    최길호 2020/07/18 678
Docker  docker filesystem 이동    최길호 2020/07/16 332
Docker  docker centos6 , centos7 / oracle 10 / all_no_orcl of makefile ins_rdbms.mk / snmccolm.o: could not read symbols: File in wrong format    최길호 2020/07/16 457
Docker  docker search / rename / commit (container to image) / oracle linux 7 OL7 / oracle linux 8 OL8 / Oracle Database 19C Install    최길호 2020/07/16 764
Docker  docker login / oracle 12.2    최길호 2020/07/15 415
Docker  docker ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded    최길호 2020/07/06 466
Docker  Docker 시작    최길호 2020/07/06 443
Linux  Linux 서버 붙은 Client IP list 확인    최길호 2020/06/30 310
Linux  yum , rpm -qa hang [ yum rpm --rebuilddb rpm 재구성 ]    최길호 2020/06/22 1168
Linux  linux process memory 사용 확인    최길호 2020/04/09 442

    목록보기   이전페이지   다음페이지 [1][2][3] 4 [5][6][7][8][9][10]..[31]   [다음 10개]
       

Copyright 1999-2024 Zeroboard / skin by 최길호(gilho.kr@gmail.com)
최근 댓글
2016/06/09
201606 추가 grid/runcluvfy.sh...
by 최길호
2016/05/09
lg tab full screen VNCSERVE...
by 최길호
2013/10/17
rsync -avH /data/*

by 최길호
최근 게시물
07/22
[ORACLE]
ogg Rolling over remote file [....
by 최길호
07/15
[ORACLE]
PRKF-1125 : multiple values sp....
by 최길호
07/04
[운영체제]
NIC add cli / nmcli device sho....
by 최길호