Create image
This commit is contained in:
		
							
								
								
									
										25
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					FROM steamcmd/steamcmd:latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN useradd soldat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN steamcmd \
 | 
				
			||||||
 | 
					    +login anonymous \
 | 
				
			||||||
 | 
					    +force_install_dir /soldat \
 | 
				
			||||||
 | 
					    +app_update 638500 validate \
 | 
				
			||||||
 | 
					    +quit
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WORKDIR /soldat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY startserver.sh /soldat/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN mkdir config
 | 
				
			||||||
 | 
					RUN mv mapslist.txt mapslist.default.txt && \
 | 
				
			||||||
 | 
					    ln -s config/mapslist.txt mapslist.txt
 | 
				
			||||||
 | 
					RUN mv soldat.ini soldat.default.ini && \
 | 
				
			||||||
 | 
					    ln -s config/soldat.ini soldat.ini
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN chown -R soldat:root /soldat/logs/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					USER soldat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENTRYPOINT ["/soldat/startserver.sh"]
 | 
				
			||||||
							
								
								
									
										11
									
								
								startserver.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										11
									
								
								startserver.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ ! -f "config/mapslist.txt" ]; then
 | 
				
			||||||
 | 
					    cp mapslist.default.txt config/mapslist.txt
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ ! -f "config/soldat.ini" ]; then
 | 
				
			||||||
 | 
					    cp soldat.default.ini config/soldat.ini
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					./soldatserver
 | 
				
			||||||
		Reference in New Issue
	
	Block a user