반응형

 

shell script 작성 후 shell script를 실행 시키는 image 를 Alpine linux 로 이미지 생성 후 Pod 실행시

No such file or directory 에러가 발생하였다.

 

확인해보니 shell script 제일 상단에 #!/bin/bash 가 문제였고

Alpine linux 의 경우 shell script 제일 상단에 #!/bin/sh 로 해주어야한다.

#!/bin/bash -> #!bin/sh

 

bash를 사용해야하는 경우라면 bash를 추가해서 사용하면 된다.

apk add bash

 

반응형
반응형

 

Docker 대신 image를 만들 수 있는 도구

기본적으로 Docker 명령어와 동일한 듯 하다.

 

1. install

sudo apt install buildah

 

2. build

buildah build -f Dockerfile -t fedora-httpd .
# or
buildah build -t fedora-httpd

 

3. push 

buildah push registry.example.com/my_image

 

https://github.com/containers/buildah/blob/main/docs/tutorials/01-intro.md

https://github.com/containers/buildah/blob/main/docs/buildah-push.1.md

반응형
반응형

 

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

 

반응형

+ Recent posts