first commit
This commit is contained in:
parent
8f87949967
commit
a5463e0a38
3 changed files with 62 additions and 0 deletions
44
Dockerfile
Normal file
44
Dockerfile
Normal file
|
@ -0,0 +1,44 @@
|
|||
#Download base image ubuntu 16.04
|
||||
FROM ubuntu:18.04
|
||||
#FROM python:3.6
|
||||
|
||||
ARG PORT_SSH=2222
|
||||
#ARG DIRECTORY_LOGS="/apps/data/pshitt/logs"
|
||||
#ARG DIRECTORY_DATA="/apps/data/pshitt/data"
|
||||
|
||||
# Update Ubuntu Software repository
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -y git python-setuptools python-pip && \
|
||||
cd /srv && \
|
||||
git clone https://github.com/regit/pshitt.git && \
|
||||
mkdir -p /srv/pshitt/keys /srv/pshitt/_LOG && \
|
||||
#pip install --upgrade pip && \
|
||||
pip install python-daemon && \
|
||||
pip install argparse && \
|
||||
pip install paramiko && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#WORKDIR /srv/pshitt
|
||||
|
||||
#COPY ssh_host_rsa_key /apps/data/keyfiles/keyfile
|
||||
COPY ssh_host_rsa_key /srv/pshitt/keys/ssh_host_rsa_key
|
||||
#COPY exec_pshitt.sh /srv/pshitt/exec_pshitt.sh
|
||||
|
||||
#RUN chmod +x /srv/pshitt/exec_pshitt.sh
|
||||
|
||||
#ENV PATH /srv/pshitt/:${PATH}
|
||||
#ENV PORT_SSH ${PORT_SSH}
|
||||
#ENV THREADS ${THREADS}
|
||||
#ENV KEYFILE ${KEYFILE}
|
||||
#ENV DIRECTORY_LOGS ${DIRECTORY_LOGS}
|
||||
#ENV DIRECTORY_DATA ${DIRECTORY_DATA}
|
||||
|
||||
#EXPOSE ${PORT_SSH}
|
||||
|
||||
EXPOSE 2222
|
||||
|
||||
#ENTRYPOINT ["/srv/pshitt/exec_pshitt.sh"]
|
||||
|
||||
#ENTRYPOINT /srv/pshitt/./pshitt -p 2222 -k /srv/pshitt/keys/ssh_host_rsa_key -o /srv/pshitt/_LOG/$(date +%Y%m%d%H%M)_data.json -l /srv/pshitt/_LOG/$(date +%Y%m%d%H%M)_log.log && /bin/bash
|
||||
ENTRYPOINT /srv/pshitt/./pshitt -p 2222 -k /srv/pshitt/_HOST_SSH_KEYS/ssh_host_rsa_key -o /srv/pshitt/_LOG/$(date +%Y%m%d%H%M)_data.json -l /srv/pshitt/_LOG/$(date +%Y%m%d%H%M)_log.log && /bin/bash
|
12
README.md
12
README.md
|
@ -1,2 +1,14 @@
|
|||
# Docker_Pshitt
|
||||
|
||||
#Build the container:
|
||||
docker build -t pshitt_dockerized .
|
||||
|
||||
#run the container:
|
||||
docker run -d -v /etc/ssh:/srv/pshitt/_HOST_SSH_KEYS -v /pshitt/_LOG:/srv/pshitt/_LOG --name pshitt_dockerized -p 2222:2222 pshitt_dockerized
|
||||
notes:
|
||||
1-the ssh keys used are the same of the host, this is wanted, to avoid using pshitt's default which are always the same thus easily identifiable
|
||||
2-the logs are written on the local fs in /pshitt/_LOG
|
||||
3- the port on which pshitt listens is redirected on the host and is 2222
|
||||
|
||||
#Start the container:
|
||||
docker start pshitt_dockerized
|
||||
|
|
6
notes.txt
Normal file
6
notes.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
docker build -t pshitt_dockerized .
|
||||
docker run -d -v /etc/ssh:/srv/pshitt/_HOST_SSH_KEYS -v /pshitt/_LOG:/srv/pshitt/_LOG --name pshitt_dockerized -p 2222:2222 pshitt_dockerized
|
||||
docker stop pshitt_dockerized
|
||||
docker start pshitt_dockerized
|
||||
docker exec -ti pshitt_dockerized bash
|
||||
|
Loading…
Reference in a new issue