forked from loafle/openapi-generator-original
		
	The defaults configured for GENERATOR_HOST didn't really make sense. When running the docker container with `-P`, GENERATOR_HOST defaulted to http://localhost. This caused download links for generated client/server code to be incorrect. For most cases, there's no reason to provide GENERATOR_HOST as the code already figures the appropriate scheme/host/port from the originating request. GENERATOR_HOST could still be used for more complex deployment scenarios, for instance if a specific server is configured as a file server. I haven't tested this scenario, and it may require mounting /tmp as a volume when running within a container.
		
			
				
	
	
		
			16 lines
		
	
	
		
			509 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			509 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM openjdk:8-jre-alpine
 | |
| 
 | |
| WORKDIR /generator
 | |
| 
 | |
| COPY target/openapi-generator-online.jar /generator/openapi-generator-online.jar
 | |
| 
 | |
| # GENERATOR_HOST can be used to determine the target location of a download link.
 | |
| # The default value asumes binding to host via: docker -p 8080:8080 image_name
 | |
| # Generally, this "just works" without GENERATOR_HOST, and this is provided only as
 | |
| # a workaround if all else fails.
 | |
| ENV GENERATOR_HOST=""
 | |
| 
 | |
| EXPOSE 8080
 | |
| 
 | |
| CMD ["java", "-jar", "/generator/openapi-generator-online.jar" ]
 |