in a single line you gonna use some command line tricks. Something like
RUN dgraph zero & dgraph alpha & \
bash waitforit.sh
You have or to create the whole process in that multiline or create a script file(waitforit.sh) to run the rest of the process