Weekend Sale Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Free Access CompTIA XK0-005 New Release

Page: 5 / 22
Total 292 questions

CompTIA Linux+ Exam Questions and Answers

Question 17

An application developer received a file with the following content:

##This is a sample Image ##

FROM ubuntu:18.04

MAINTAINER demohut@gtmail.com.hac

COPY . /app

RUN make /app

CMD python /app/app.py

RUN apt-get update

RUN apt-get install -y nginx

CMD ["echo","Image created"]

The developer must use this information to create a test bed environment and identify the image (myimage) as the first version for testing a new

application before moving it to production. Which of the following commands will accomplish this task?

Options:

A.

docker build -t myimage:1.0 .

B.

docker build -t myimage: .

C.

docker build -t myimage-1.0 .

D.

docker build -i myimage:1.0 .

Question 18

A Linux administrator is providing a new Nginx image from the registry to local cache. Which of the following commands would allow this to happen?

Options:

A.

docker pull nginx

B.

docker attach nginx

C.

docker commit nginx

D.

docker import nginx

Question 19

A cloud engineer is installing packages during VM provisioning. Which of the following should the engineer use to accomplish this task?

Options:

A.

Cloud-init

B.

Bash

C.

Docker

D.

Sidecar

Question 20

A junior administrator is trying to set up a passwordless SSH connection to one of the servers. The administrator follows the instructions and puts the key in the authorized_key file at the server, but the administrator is still asked to provide a password during the connection.

Given the following output:

Which of the following commands would resolve the issue and allow an SSH connection to be established without a password?

Options:

A.

restorecon -rv .ssh/authorized_key

B.

mv .ssh/authorized_key .ssh/authorized_keys

C.

systemct1 restart sshd.service

D.

chmod 600 mv .ssh/authorized_key

Page: 5 / 22
Total 292 questions