Do you really have a good reason for this permission setup? > RUN chmod 777 /root/startup.sh --- It's a bit ironic to use the `-v` flag of `tar`, and then redirecting the output to `/dev/null` here: > RUN tar -xvzf httpd-2.4.18.tar.gz >/dev/null You can drop that flag and the redirection, the outcome should be the same. --- I'm not very familiar with Docker, but I'm wondering what will happen if any of the commands fail. For example, if `make` fails, you probably don't want to run the `make install ` command that follows it. I don't have a solution for that, but error handling is something to think about. --- The repetitive redirections and duplicated strings don't look pretty, and look hard to maintain. There gotta be a better way. Perhaps you could put the shell commands into a proper `.bash` script, enjoy all the power of regular bash scripting (variables, functions), and in the docker file just fetch that script using `wget`, and then execute it.