| 
									
										
										
										
											2021-09-23 21:11:24 +00:00
										 |  |  | FROM alpine:3.11 | 
					
						
							| 
									
										
										
										
											2019-12-27 20:09:15 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | # Include dist | 
					
						
							|  |  |  | ADD dist/ /root/dist/ | 
					
						
							| 
									
										
										
										
											2019-12-27 20:09:15 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | # Get and install dependencies & packages | 
					
						
							| 
									
										
										
										
											2021-09-23 21:11:24 +00:00
										 |  |  | RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \ | 
					
						
							|  |  |  |     apk -U add \ | 
					
						
							|  |  |  |             build-base \ | 
					
						
							| 
									
										
										
										
											2018-03-29 16:21:00 +00:00
										 |  |  |             git \ | 
					
						
							|  |  |  |             libffi-dev \ | 
					
						
							|  |  |  |             openssl \ | 
					
						
							| 
									
										
										
										
											2021-09-23 21:11:24 +00:00
										 |  |  |             openssl-dev \ | 
					
						
							|  |  |  |             python \ | 
					
						
							|  |  |  |             python-dev \ | 
					
						
							|  |  |  |             py-pip \ | 
					
						
							|  |  |  |             py-setuptools && \ | 
					
						
							| 
									
										
										
										
											2019-12-27 20:09:15 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | # Setup user | 
					
						
							| 
									
										
										
										
											2021-09-23 21:11:24 +00:00
										 |  |  |     addgroup -g 2000 rdpy && \ | 
					
						
							|  |  |  |     adduser -S -s /bin/ash -u 2000 -D -g 2000 rdpy && \ | 
					
						
							| 
									
										
										
										
											2019-12-27 20:09:15 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2018-05-25 16:18:05 +00:00
										 |  |  | # Install deps  | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  |     pip install --no-cache-dir --upgrade cffi && \ | 
					
						
							| 
									
										
										
										
											2018-05-19 21:35:24 +00:00
										 |  |  |     pip install --no-cache-dir \ | 
					
						
							| 
									
										
										
										
											2018-05-25 16:18:05 +00:00
										 |  |  |                 hpfeeds \ | 
					
						
							| 
									
										
										
										
											2018-05-19 21:35:24 +00:00
										 |  |  |                 twisted \ | 
					
						
							| 
									
										
										
										
											2018-03-29 16:21:00 +00:00
										 |  |  |                 pyopenssl \ | 
					
						
							|  |  |  |                 qt4reactor \ | 
					
						
							|  |  |  |                 service_identity \ | 
					
						
							| 
									
										
										
										
											2021-09-23 21:11:24 +00:00
										 |  |  |                 rsa==4.5 \		 | 
					
						
							| 
									
										
										
										
											2018-05-25 16:18:05 +00:00
										 |  |  |                 pyasn1 && \ | 
					
						
							| 
									
										
										
										
											2019-12-27 20:09:15 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2018-05-25 16:18:05 +00:00
										 |  |  | # Install rdpy from git | 
					
						
							| 
									
										
										
										
											2019-02-25 15:12:48 +00:00
										 |  |  |     mkdir -p /opt && \ | 
					
						
							| 
									
										
										
										
											2018-05-25 16:18:05 +00:00
										 |  |  |     cd /opt && \ | 
					
						
							| 
									
										
										
										
											2020-09-04 12:37:28 +00:00
										 |  |  |     git clone https://github.com/t3chn0m4g3/rdpy && \ | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  |     cd rdpy && \ | 
					
						
							| 
									
										
										
										
											2020-09-04 12:37:28 +00:00
										 |  |  |     git checkout 1d2a4132aefe0637d09cac1a6ab83ec5391f40ca && \ | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  |     python setup.py install && \ | 
					
						
							| 
									
										
										
										
											2019-12-27 20:09:15 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | # Setup user, groups and configs | 
					
						
							| 
									
										
										
										
											2018-05-25 16:18:05 +00:00
										 |  |  |     cp /root/dist/* /opt/rdpy/ && \ | 
					
						
							|  |  |  |     chown rdpy:rdpy -R /opt/rdpy/* && \ | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  |     mkdir -p /var/log/rdpy && \ | 
					
						
							| 
									
										
										
										
											2019-12-27 20:09:15 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | # Clean up | 
					
						
							| 
									
										
										
										
											2021-09-23 21:11:24 +00:00
										 |  |  |     rm -rf /root/* && \ | 
					
						
							|  |  |  |     apk del --purge build-base \ | 
					
						
							| 
									
										
										
										
											2018-03-29 20:56:11 +00:00
										 |  |  |                     git \ | 
					
						
							| 
									
										
										
										
											2018-03-29 16:21:00 +00:00
										 |  |  |                     libffi-dev \ | 
					
						
							| 
									
										
										
										
											2021-09-23 21:11:24 +00:00
										 |  |  |                     openssl-dev \ | 
					
						
							|  |  |  |                     python-dev \ | 
					
						
							|  |  |  |                     py-pip && \  | 
					
						
							|  |  |  |     rm -rf /var/cache/apk/* | 
					
						
							| 
									
										
										
										
											2019-12-27 20:09:15 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | # Start rdpy | 
					
						
							| 
									
										
										
										
											2018-03-29 20:56:11 +00:00
										 |  |  | USER rdpy:rdpy | 
					
						
							| 
									
										
										
										
											2021-09-23 21:11:24 +00:00
										 |  |  | CMD exec /usr/bin/python2 -i /usr/bin/rdpy-rdphoneypot.py /opt/rdpy/$(shuf -i 1-3 -n 1) >> /var/log/rdpy/rdpy.log |