반응형
이슈
fortuneloop.sh
#!/bin/bash
trap "exit" SIGINT
INTERVAL=$1
echo Configured to generate new fortune every $INTERVAL seconds
mkdir -p /var/htdocs
while :
do
echo $(date) Writing fortune to /var/htdocs/index.html
/usr/games/fortune > /var/htdocs/index.html
sleep $INTERVAL
done
Dockerfile
FROM ubuntu:latest
RUN apt-get update ; apt-get -y install fortune
ADD fortuneloop.sh /bin/fortuneloop.sh
ENTRYPOINT ["/bin/fortuneloop.sh"]
CMD ["10"]
chmod로 주면 될거 같았는데 계속 파일을 못찾았다.
이렇게 고치니까 해결되었다.
FROM ubuntu:latest
RUN apt-get update ; apt-get -y install fortune
ADD fortuneloop.sh /bin/fortuneloop.sh
RUN chmod +x /bin/fortuneloop.sh
ENTRYPOINT ["/bin/fortuneloop.sh"]
CMD ["10"]
참고링크
Failure starting Docker container. "failed to create shim task: OCI runtime create failed: runc create failed"
I am new to Ubuntu and new to Docker. I am running a command that was given to me in an explanation of how to start the project. I want to start my Docker containers and they fail with an error. Some
stackoverflow.com
반응형
'서버 > docker' 카테고리의 다른 글
[docker] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (0) | 2024.10.01 |
---|