mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-31 22:05:26 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			892 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			892 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| FROM alpine:3.21 AS base-alpine
 | |
| RUN apk add --no-cache bash procps drill coreutils libidn curl socat openssl xxd \
 | |
|     && addgroup testssl \
 | |
|     && adduser -G testssl -g "testssl user" -s /bin/bash -D testssl \
 | |
|     && ln -s /home/testssl/testssl.sh /usr/local/bin/testssl.sh
 | |
| 
 | |
| # Runtime config:
 | |
| USER testssl
 | |
| ENTRYPOINT ["testssl.sh"]
 | |
| CMD ["--help"]
 | |
| 
 | |
| # Final image stage (add `testssl.sh` project files)
 | |
| # Choose either one as the final stage (defaults to last stage, `dist-git`)
 | |
| 
 | |
| # 27MB Image (Local repo copy from build context, uses `.dockerignore`):
 | |
| FROM base-alpine AS dist-local
 | |
| COPY --chown=testssl:testssl . /home/testssl/
 | |
| 
 | |
| # 35MB Image (Remote repo clone, cannot filter content through `.dockerignore`):
 | |
| FROM base-alpine AS dist-git
 | |
| ARG GIT_URL=https://github.com/testssl/testssl.sh.git
 | |
| ARG GIT_BRANCH
 | |
| ADD --chown=testssl:testssl ${GIT_URL}#${GIT_BRANCH?branch-required} /home/testssl
 | 
