Mac에서는 --network host 모드가 동작하지 않음.
-p 8080:8080 포트매핑으로 열어줘야함.

https://docs.docker.com/docker-for-mac/networking/

 

Networking features in Docker Desktop for Mac

Docker Desktop for Mac provides several networking features to make it easier to use. Features VPN Passthrough Docker Desktop for Mac’s networking can work when attached to a VPN. To...

docs.docker.com

 

'Routine > LINUX' 카테고리의 다른 글

Log 삭제  (0) 2020.02.02
Userful Vim Command  (0) 2020.02.02
Alias 추가  (0) 2020.02.02
SHELL 컬러 변경  (0) 2020.02.02
Useful Linux Command  (0) 2020.02.02
  • 최근 7일 남기고 지우기
sudo find {로그위치} -mindepth 1 -maxdepth 1 -mtime +7 -type d -exec rm -rf {} \;

 

'Routine > LINUX' 카테고리의 다른 글

MAC에서 도커 Port열기  (0) 2020.02.05
Userful Vim Command  (0) 2020.02.02
Alias 추가  (0) 2020.02.02
SHELL 컬러 변경  (0) 2020.02.02
Useful Linux Command  (0) 2020.02.02
  • 줄번호 보기
:set number

 

  • 파일 인코딩 확인
:set tenc? #-> 인식 불가능 문자가 있을 경우 latin1등으로 표기됨.

 

  • 파일 인코딩 변경하여 reload
:e ++enc=euc-kr #(터미널 설정으로 대체)

 

  • 터미널 인코딩을 터미널 설정과 일치시킴
:set tenc=euckr #(터미널 설정으로 대체)

 

  • 파일의 인코딩 변경
:set fileencoding=utf-8

 

  • 줄바꿈 기호 변경 DOS-> UNIOX (\r\n -> \n)
    • CR(Carrige Return, \r, 0x0d) : 새로운 행 추가.
    • LF(Line Feed, \n, 0x0a) : 시작위치로 복귀
    • DOS: CR, LF
    • UNIX : LF

http://www.dreamy.pe.kr/zbxe/CodeClip/165521

 

CR, LF, ^M - vi로 DOS<->UNIX 줄바꿈 전환

CR, LF 는 줄바꿈 문자..  DOS<->Unix화일 주고 받을때 종종 문제가 되는데.. 모른척 종종 넘겨버렷으나 이번기회에 대충 집고 넘어가기.. * 유닉스(Unix)/리눅스(Linux)에는, LF (헥사로는 0x0A에 해당) 문자로 줄바꿈을 하고 * 도스(DOS)/윈도우(Windows)에서는, CR-LF (헥사로는 0x0D 0x0A에 해당) 라는 2문자로 줄바꿈을 하고 * 맥(Mac)에서는, CR (헥사로는 0x0D 에 해당) 로 줄바꿈합니다. "

www.dreamy.pe.kr

:set fileformat=unix

'Routine > LINUX' 카테고리의 다른 글

MAC에서 도커 Port열기  (0) 2020.02.05
Log 삭제  (0) 2020.02.02
Alias 추가  (0) 2020.02.02
SHELL 컬러 변경  (0) 2020.02.02
Useful Linux Command  (0) 2020.02.02
  • ~/.bash_profile 에 alias 추가
$ echo "alias _별명_='_원래 명령어_'" >> ~/.bash_profile
$ echo "alias ll='ls -al'" >> ~/.bash_profile

 

  • ~/.bash_profile 확인
$ cat ~/.bash_profile

 

  • ~/.bash_profile 변경 사항 적용
$ source ~/.bash_profile

'Routine > LINUX' 카테고리의 다른 글

Log 삭제  (0) 2020.02.02
Userful Vim Command  (0) 2020.02.02
SHELL 컬러 변경  (0) 2020.02.02
Useful Linux Command  (0) 2020.02.02
Useful Docker Command on Ubuntu  (0) 2020.02.02

https://www.lesstif.com/pages/viewpage.action?pageId=24445156

 

검은색 터미널에서 ls 의 디렉토리 가독성 좋게 하기

Solarized Color Theme for GNU ls 로 DIRCOLOR를 변경했고 아래는 기록 차원에서 남겨 놓습니다.

www.lesstif.com

https://m.blog.naver.com/occidere/220942130602

 

7. 터미널(쉘) 디렉토리 및 파일 색상 변경

터미널로 작업하는 리눅스 사용자라면 다들 치를 떨 부분이 있다. 바로 글자 색상이다. 그 중에서도 악독한...

blog.naver.com

 

'Routine > LINUX' 카테고리의 다른 글

Userful Vim Command  (0) 2020.02.02
Alias 추가  (0) 2020.02.02
Useful Linux Command  (0) 2020.02.02
Useful Docker Command on Ubuntu  (0) 2020.02.02
Azure azcopy, blob upload  (0) 2020.02.02
  • 모델확인
sudo dmidecode | grep "Product Name:"

 

 

  • RAM확인
free -m

 

  • 우분투 버전확인
dpkg -s libc6 | grep Arch

 

  • OS확인
cat /etc/*release*

 

  • 그래픽 카드 확인
lspci | grep -i nvidia

 

  • 메모리 초기화
sudo sysctl -w vm.drop_caches=3

 

  • CPU 확인
# CPU 논리코어
grep -c processor /proc/cpuinfo

# CPU 물리코어
grep "physical id" /proc/cpuinfo | sort -u | wc -l

# CPU 물리코어당 코어
grep "cpu cores" /proc/cpuinfo | tail -1

 

  • GPU상태확인
nvidia-smi -l 1

 

  • 열려있는 포트(port)확인
lsof -i -nP | grep LISTEN | awk '{print $(NF-1)" "$1}' | sort -u

 

  • 터미널 한글깨짐
~/..bash_profile에
export LANG=ko_KR.euckr 추가

'Routine > LINUX' 카테고리의 다른 글

Alias 추가  (0) 2020.02.02
SHELL 컬러 변경  (0) 2020.02.02
Useful Docker Command on Ubuntu  (0) 2020.02.02
Azure azcopy, blob upload  (0) 2020.02.02
Ubuntu-Setup-Scripts  (0) 2020.02.02
  • Docker statck 배포 시 registry 인증 정보 전달
sudo docker stack deploy --compose-file=portainer-agent-stack.yml --with-registry-auth portainer

 

 

  • 도커 안쓰는 컨테이너 삭제
sudo docker container rm $(sudo docker ps -a -f status=exited -q)

 

 

  • 도커 안쓰는 이미지 삭제
sudo docker rmi $(sudo docker images --filter "dangling=true" -q --no-trunc)

 

 

  • 도커 journal log 확인
sudo journalctl -fu docker.service

 

 

  • syslog확인
/var/log/syslog

 

 

  • custom Docker daemon options

https://docs.docker.com/config/daemon/systemd/

 

Control Docker with systemd

Many Linux distributions use systemd to start the Docker daemon. This document shows a few examples of how to customize Docker’s settings. Start the Docker daemon Start manually Once Docker...

docs.docker.com

sudo vi /etc/docker/daemon.json

 

 

  • Docker daemon service path
/lib/systemd/system/docker.service

 

 

  • Docker Default Runtime Nvidia

https://twitter.com/portainerio/status/935433391352168448

 

Portainer.io on Twitter

“One of our users just shared how to run Portainer on an nvidia docker engine..”

twitter.com

 

  • 도커 2375 포트 열기

https://docs.docker.com/v17.09/engine/reference/commandline/dockerd/#daemon-socket-option

 

dockerd

daemon Usage: dockerd COMMAND A self-sufficient runtime for containers. Options: --add-runtime runtime Register an additional OCI compatible runtime (default []) --allow-nondistributable-artifacts list Push nondistributable artifacts to specified registrie

docs.docker.com

$ vi /lib/systemd/system/docker.service

[Service]
ExecStart=/usr/bin/dockerd -H unix:// -H tcp://0.0.0.0:2375 -g "도커path"

$ systemctl daemon-reload
$ systemctl restart docker.service

 

'Routine > LINUX' 카테고리의 다른 글

SHELL 컬러 변경  (0) 2020.02.02
Useful Linux Command  (0) 2020.02.02
Azure azcopy, blob upload  (0) 2020.02.02
Ubuntu-Setup-Scripts  (0) 2020.02.02
CentOS git version update  (0) 2020.02.02

1. az cli install 

https://docs.microsoft.com/ko-kr/cli/azure/install-azure-cli?view=azure-cli-latest

 

Azure CLI 설치

Azure CLI 설치에 대한 참조 문서입니다.

docs.microsoft.com

 

2-1. Azcopy

https://docs.microsoft.com/ko-kr/azure/storage/common/storage-ref-azcopy-copy

 

azcopy 복사

이 문서에서는 azcopy copy 명령에 대 한 참조 정보를 제공 합니다.

docs.microsoft.com

 

2-2Azure blob upload

https://docs.microsoft.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-upload

 

az storage blob

Manage object storage for unstructured data (blobs).

docs.microsoft.com

az storage blob upload -f ./파일명 \
-n BLOB위치 \
-c BOLB 컨테이너명 \
--account-name 유저명 \
--account-key 비밀번호

'Routine > LINUX' 카테고리의 다른 글

Useful Linux Command  (0) 2020.02.02
Useful Docker Command on Ubuntu  (0) 2020.02.02
Ubuntu-Setup-Scripts  (0) 2020.02.02
CentOS git version update  (0) 2020.02.02
on Ubuntu 16.04/18.04 LTS cuda 버전 확인  (0) 2019.01.02

https://github.com/rsnk96/Ubuntu-Setup-Scripts

 

rsnk96/Ubuntu-Setup-Scripts

Scripts to help you set up your Ubuntu quickly, especially if you're in any subfield of Data Science or AI! - rsnk96/Ubuntu-Setup-Scripts

github.com

Everyone who has tried to mess around with their Ubuntu distro knows the pain of having to reinstall Ubuntu and set it up to their liking again

These are the scripts that I use to set my Ubuntu up as quick as possible. Feel free to fork it and create your own version, and any contributions are more than welcome :)

 

'Routine > LINUX' 카테고리의 다른 글

Useful Docker Command on Ubuntu  (0) 2020.02.02
Azure azcopy, blob upload  (0) 2020.02.02
CentOS git version update  (0) 2020.02.02
on Ubuntu 16.04/18.04 LTS cuda 버전 확인  (0) 2019.01.02
명령어 주기적으로 수행하기  (0) 2019.01.02

https://tecadmin.net/install-git-on-centos-fedora/

 

How To Install Git 2.25 on CentOS/RHEL 7/6 & Fedora 31/30

install latest git Linux. Install Git 2.25 on CentOS/RHEL and Fedora. This article will help you to install Latest git on CentOS, RHEL and Fedora

tecadmin.net

  • 필수 설치
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker

'Routine > LINUX' 카테고리의 다른 글

Useful Docker Command on Ubuntu  (0) 2020.02.02
Azure azcopy, blob upload  (0) 2020.02.02
Ubuntu-Setup-Scripts  (0) 2020.02.02
on Ubuntu 16.04/18.04 LTS cuda 버전 확인  (0) 2019.01.02
명령어 주기적으로 수행하기  (0) 2019.01.02