List of questions
Related questions
Question 330 - XK0-005 discussion
An operations engineer is planning to start a container running a PostgreSQL database. The engineer wants the container to start automatically at system startup, mount the /home/db directory as /var/lib/postgresql inside the container, and expose port 5432 to the OS. Which of the following commands should the engineer run to achieve this task?
docker run -d --restart always -p 5432:5432 -v /home/db:/var/lib/postgresql postgresql:12
docker run -d --restart -p 5432:5432 --volume /var/lib/postgresql:/home/db postgresql:12
docker run -d --attach --platform 5432:5432 --volume /home/db:/var/lib/postgresql postgresql:12
docker run -d --init --restart --publish 5432:5432 --workdir /home/db:/var/lib/postgresql postgresql:12
0 comments
Leave a comment first