Closed aristofanischionis closed 1 year ago
I haven't maintained kippo, or accepted any pull requests for a long time. Perhaps adding a Dockerfile would be a good last thing to add before archiving the repository, since it makes it easier to run it with the older dependencies that it needs.
The Dockerfile looks good in general, but there's a couple things that probably should be changed:
start.sh
, just change the CMD to run the twistd
command directlyHi @desaster, thanks for replying so quickly! I tried to implement your comments.
mariadb-client
and libmariadbclient-dev
dependencies as the MySQL client is not available anymore (I think...) - I hope that's fine.twisted
version to 15.1.0.docker run -v path/on/host:/app/log -p 2222:2222 kippo:latest
but when I was trying to connect to it like this: ssh -p 2222 -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=ssh-dss,ssh-rsa root@127.0.0.1
, after inputting the password for root, I got the following error: shell request failed on channel 0
. I tried to fix it by changing the permissions to the file: /app/log/tty
, but this didn't work. Any ideas? Thanks a lot.Here is the updated Dockerfile code:
# Use an official Python runtime as a parent image
FROM python:2.7-slim
# Create a non-root user and switch to it
RUN adduser --disabled-password --gecos '' app
USER app
# Set the working directory in the container to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Switch back to root to install dependencies
USER root
# Install necessary packages and clean up
RUN apt-get update && apt-get install -y \
python-dev=2.7.* \
build-essential=* \
mariadb-client=* \
libmariadbclient-dev=* && \
rm -rf /var/lib/apt/lists/*
# Create the data and log directory and set their permissions
RUN mkdir -p /app/data /app/log /app/log/tty && \
chown -R 777 /app/log/tty && \
chown -R app:app /app/data /app/log
# Install Python packages
RUN pip install --no-cache-dir zope.interface==5.5.2 Twisted==15.1.0 pycrypto==2.6.1 pyasn1==0.5.0
# Switch back to the non-root user
USER app
# Make port 2222 available to the world outside thiscontainer
EXPOSE 2222
# Run twistd command when the container launches
CMD ["twistd", "-n", "-y", "kippo.tac", "-l", "log/kippo.log", "--pidfile", "kippo.pid"]
I changed the base image to alpine, and added docker-compoyse.yml. PR #242
I was trying to run Kippo locally for a University project and I found it very difficult, so I decided to create a Dockerfile and pushed the Docker image in Docker Hub for anyone who wants to easily run the latest version of Kippo on their local machine. Can I open a PR with the Dockerfile to be included in the official repository? Is anyone interested in this? The link to the Docker Image I created is here: https://hub.docker.com/r/aristofanischionis/kippo
The Dockerfile has these contents: