Added mongo Dockerfile
This commit is contained in:
		
							
								
								
									
										4
									
								
								MongoDB/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								MongoDB/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
FROM mongo:latest
 | 
			
		||||
 | 
			
		||||
EXPOSE 27017
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								MongoDB/instructions
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								MongoDB/instructions
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
Launch plain docker file
 | 
			
		||||
 | 
			
		||||
	docker run -d -p 27017:27017 -v ~/dataMongo:/data/db mongo
 | 
			
		||||
 | 
			
		||||
Create a user (root) and any other databases (with users)
 | 
			
		||||
 | 
			
		||||
Close and re-run docker file with auth enabled (DBs Should persist)
 | 
			
		||||
 | 
			
		||||
	docker run -d -p 27017:27017 -v ~/dataMongo:/data/db mongo --auth
 | 
			
		||||
		Reference in New Issue
	
	Block a user