Dev/dockerfile

Dockerfile

FROM python:3.10.6-slim

ENV TZ="America/Sao_Paulo"
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1

RUN apt update && apt install -y --no-install-recommends \
    default-jre \
    git \
    zsh \
    curl \
    wget \
    fonts-powerline \
    nano

COPY ./.docker/dev/start /start
RUN sed -i 's/\r$//g' /start
RUN chmod +x /start

RUN useradd -ms /bin/bash python
USER python

ENV PYTHONPATH=${PYTHONPATH}/home/python/app/src
ENV PATH=${PATH}:/home/python/.local/bin

RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
    -t https://github.com/romkatv/powerlevel10k.git \
    -p git \
    -p https://github.com/zdharma-continuum/fast-syntax-highlighting \
    -p https://github.com/zsh-users/zsh-autosuggestions \
    -p https://github.com/zsh-users/zsh-completions \
    -a 'export TERM=xterm-256color'

RUN echo '[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh' >> ~/.zshrc
RUN echo 'HISTFILE=/home/python/zsh/.zsh_history' >> ~/.zshrc
RUN echo 'if test -t 1; then exec zsh; fi' >> ~/.bashrc

WORKDIR /home/python/app

COPY ./requirements.txt /home/python/app/requirements.txt
RUN pip install --upgrade pip && pip install -r requirements.txt