Skip to content

Instantly share code, notes, and snippets.

@ewalk153
Last active February 13, 2024 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ewalk153/34112fee9a9ebd53ce8d29f644b43204 to your computer and use it in GitHub Desktop.
Save ewalk153/34112fee9a9ebd53ce8d29f644b43204 to your computer and use it in GitHub Desktop.
piku docker image
FROM debian:bullseye
ENV DEBIAN_FRONTEND=noninteractive
# Install the minimum amount of packages required for testing, which currently means:
# - minimal set of packages required to run Python 3
# - shipping versions of uWSGI and nginx (so that config files are put in the right places)
# Also, make sure we have a sane default locale inside the container
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
apt-utils \
ca-certificates \
locales \
curl \
tzdata \
git \
build-essential \
git \
nginx \
vim \
python3-pip \
python3-click \
openssh-server \
python3-virtualenv \
uwsgi \
uwsgi-plugin-asyncio-python3 \
uwsgi-plugin-python3 \
&& locale-gen en_US.UTF-8
WORKDIR /root
# curl https://piku.github.io/get | sh
RUN curl -s https://raw.githubusercontent.com/piku/piku-bootstrap/master/piku-bootstrap > piku-bootstrap
RUN chmod 755 piku-bootstrap
RUN ./piku-bootstrap first-run --no-interactive
RUN mkdir -p /root/.ssh
COPY id_ed25519.pub /root/.ssh/authorized_keys
RUN mkdir /var/run/sshd
RUN ./piku-bootstrap install
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
EXPOSE 22 80 443
VOLUME ["/run"]
# CMD ["/usr/bin/python3", "/run/piku.py"]
CMD ["/usr/sbin/sshd", "-D"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment