I need to start script in busybox container which will outuput the date and words the busybox is running when I'm up my compose file i just see that:
busybox_1 | tail: invalid number 'sh ./5sec.sh'
This is my script:
while true; do
sleep 5
date
echo busybox is running
done
It's my Dockerfile:
FROM busybox:noauto
COPY /5sec.sh /5sec.sh
RUN chmod 777 5sec.sh
CMD ./5sec.sh
It's my compose file (just in case) :
version: '3'
services:
nginx:
image: "nginx:latest"
env_file: .env
ports:
- $HTTP_PORT:80
volumes:
- nginx-vol:/var/log/nginx
busybox:
image: "busybox:noauto"
volumes:
- nginx-vol:/var/log/nginx
volumes:
nginx-vol:
Help me please. How to start script automaticly. (Sorry for bad English)