반응형

 

1. Docker 아키텍쳐 pull

docker pull --platform linux/amd64 nginx:latest

 

2. Docker image 저장

docker save -o a.tar imagenams

 

3. Docker image 업로드

docker load -i a.tar

 

4. Docker image 태그 변경

docker image tag imageid a:1.0

 

5. Docker 아키텍처 빌드

docker build --platform linux/amd64 -t test:1.0 .

 

6. ctr export

# namespace k8s.io export
ctr -n=k8s.io images export nginx.tar nginxt:latest

# default namespace
ctr images export nginx.tar nginxt:latest

 

7. ctr import

# namespace k8s.io import
ctr -n=k8s.io images import nginx.tar

# default namespace
ctr images import nginx.tar

 

8. ctr image tag 변경

ctr -n=k8s.io image tag 기존이미지태그 변경할이미지태그

 

9. ctr push id/password

## https
ctr -n=k8s.io image push imagename -u "id:password"

## http일 경우
ctr -n=k8s.io image push imagename -u "id:password" --plain-http

 

반응형
반응형

 

crio 설치시 service start가 안되고 아래와 같은 에러가 발생하였다.

validating runtime config: cannot enable checkpoint/restore support without the criu binary in $PATH

 

간단히 criu만 설치해주면 되었는데, apt list를 조회하니 아래와 같이 2개가 조회되었다.

criu/jammy 3.16.1-2 arm64

golang-github-checkpoint-restore-go-criu-dev/jammy 5.1.0-1 all

 

그래서 2개다 설치해주었다. (하나만 설치해도 됐을지도)

apt-get install criu/jammy
apt-get install golang-github-checkpoint-restore-go-criu-dev/jammy

# 설치 후 cri-o 재시작
systemctl restart crio.service

 

 

반응형
반응형

 

주로 사용하던 sed 명령어들

 

1. sed 수정

sed -i 's/ver: 1.0.0/ver: 1.0.1' /home/user/test.conf

 

 

2. sed 특정 글 위에추가, 특정 글 아래 추가

특정 글 위에 추가

sed -i -r -e '/ver: 1.0.1/i\Description: version' /home/user/test.conf

 

특정글 아래 추가

sed -i -r -e '/ver: 1.0.1/a\End Of File' /home/user/test.conf

 

 

3. 특정 글 아래 수정

sed -i '/Description: version/{ n; s/ver: 1.0.1/version: 1.0.1/I}' /home/user/test.conf

 

 

4.  띄어쓰기(space) 입력

기본적으로 한줄이면 그냥 스페이스바 입력으로 되지만, 그게 아니라면 역슬래쉬(\)를 해주어야 함.

# 한 줄로 작성할 경우
sed -i -r -e '/version: 1.0.1/a\  Date: 2024' /home/user/test.conf

# 여러 줄로 작성할 경우
sed -i -r -e '/Date: 2024/a\
\ \ Month: 4(April)' /home/user/test.conf

 

 

최종 결과물

 

반응형

+ Recent posts