Don't wanna be here? Send us removal request.
Text
python. for beginners. https://wikidocs.net/15
weight = int(input(”input your weight in kg \n”))
yn = bool(input(”selected bool type ”))
print(weight)
x = True
if x:
if x == True:
if x:
else:
if isType == ‘n’:
isType = False
elif isType == ‘y’:
isType = True
else:
print(”error”)
quit()
numbers = [1, 2, 3] for number in numbers: print(number) numRange = range(1,10) for number in numRange: print (number)
count = 0 while count < 5: print(count) count += 1
def fn_add(): return 2 * 3 print(fn_add())
def fn_add(arg1, arg2): return arg1 + arg2 print(fn_add(1, 3))
names = ["john", "james", "smith"] print names[0] print names[-1] for name in names: print name for i, name in enumerate(names): print i, name
1 note
·
View note
Text
iterm2 for mac
command + shift + e : 작업시간
command + n : new 창
command + t : new 탭
command + d : 탭 새로 분할
command + shift + d : 탭 가로 분할
command + w : 탭 닫기
command + shift + h : 클립보드
0 notes
Text
Docker !
도커란?
컨테이너 기반의 가상화 오픈소스
전가상화 방식이 아닌 반가상화
도커 이미지로 다양하게 컨테이너에 적용
설치
mac install : https://docs.docker.com/docker-for-mac/
cmd
docker version
docker run <image>
docker start <name|id>
docker stop <name|id>
docker ps -a
docker rm <name|id>
docker run -d -name test -p 8081:80
docker log
cmd : image
docker images
docker pull
docker rmi
cmd : logs
docker logs <name|id>
docker logs -f
docker logs --tail 10
cmd : exec
option
-p : port 포워딩
-name : container 이름
-d : detached Mode (백그라운드)
-it 터미널을 이용
-rm 종료시 컨테이너 자동삭제
-e 컨테이너에서 사용하는 환경변수 지정
--link 컨테이너를 연결
-v 볼륨마운트
0 notes