0
0
Dockerdevops~10 mins

Using .dockerignore - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to ignore all log files in the Docker build context.

Docker
*.[1]
Drag options to blanks, or click blank then click option'
Atxt
Blog
Cmd
Djson
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong file extension like .txt or .md
Not using the asterisk (*) wildcard before the extension
2fill in blank
medium

Complete the code to ignore the directory named 'temp' in the Docker build context.

Docker
[1]/
Drag options to blanks, or click blank then click option'
Atemp.log
Btemp.txt
Ctemp
Dtempfile
Attempts:
3 left
💡 Hint
Common Mistakes
Ignoring a file instead of a directory by adding an extension
Forgetting the trailing slash to indicate a directory
3fill in blank
hard

Fix the error in the .dockerignore pattern to ignore all files in the 'cache' folder.

Docker
cache[1]*
Drag options to blanks, or click blank then click option'
A-
B\
C.
D/
Attempts:
3 left
💡 Hint
Common Mistakes
Using backslash instead of forward slash
Omitting the slash between directory and wildcard
4fill in blank
hard

Fill both blanks to ignore all files with extension '.tmp' and the directory 'build' in the Docker build context.

Docker
[1]
[2]/
Drag options to blanks, or click blank then click option'
A*.tmp
Bbuild
C*.log
Dtemp
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing file extensions or directory names
Forgetting the slash after directory names
5fill in blank
hard

Fill all three blanks to ignore files named 'secret.txt', all '.env' files, and the directory 'node_modules' in the Docker build context.

Docker
[1]
[2]
[3]/
Drag options to blanks, or click blank then click option'
Asecret.txt
B*.env
Cnode_modules
Dconfig
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the slash after directory names
Using incorrect wildcards or file names