with this script in file.sh
#!/bin/bash
echo Your container args are: "$@"
and this Dockerfile
FROM ubuntu:14.04
COPY ./file.sh /
ENTRYPOINT ["/file.sh"]
you should be able to:
% docker build -t test .
% docker run test hello world
Your container args are: hello world
More Related Contents:
- Bash command line and input limit
- Using the RUN instruction in a Dockerfile with ‘source’ does not work
- Docker: How to use bash with an Alpine based docker image?
- How to substitute quoted, multi-word strings as arguments?
- docker entrypoint running bash script gets “permission denied”
- How to set uid and gid in Docker Compose?
- Command not found error in Bash variable assignment
- How to check if a variable is set in Bash
- Shell equality operators (=, ==, -eq)
- redirect COPY of stdout to log file from within bash script itself
- Shell script to delete directories older than n days
- What is the difference between “$@” and “$*” in Bash? [duplicate]
- Shell: How to call one shell script from another shell script?
- How to redirect output of an entire shell script within the script itself?
- Quick-and-dirty way to ensure only one instance of a shell script is running at a time
- Process all arguments except the first one (in a bash script)
- How to represent multiple conditions in a shell if statement?
- How to split one string into multiple strings separated by at least one space in bash shell?
- Generating permutations using bash
- What does the Bash operator
- Remove duplicate entries in a Bash script [duplicate]
- How to parse a CSV in a Bash script?
- How to check if running in Cygwin, Mac or Linux?
- What does “plus colon” (“+:”) mean in shell script expressions?
- How does AND and OR operators work in Bash?
- Running shell command that has nested quotes via ssh
- How to reload .bash_profile from the command line
- Escaping forward slashes in sed command [duplicate]
- How do I get both STDOUT and STDERR to go to the terminal and a log file?
- -bash: __git_ps1: command not found