skip to Main Content

Ubuntu – Execute bash script in Docker Container using CMD command

Dockerfile: FROM ubuntu:latest ARG DEBIAN_FRONTEND=nointerative WORKDIR /var/photogram COPY . . RUN chmod +x /var/photogram/install.sh CMD /var/photogram/install.sh install.sh: #!/bin/bash echo "hello world" touch hello.txt touch sad.txt Structure of files: Tholkappiar2003@docker:~/docker$ tree . ├── Dockerfile └── install.sh 1 directory, 2 files Docker…

VIEW QUESTION
Back To Top
Search