Hello,
I’m trying to run locally for now docker container. I’ve used this docs, however I’ve modified a bit for my use case Dockerfile while leaving run.sh unchanged. While I’m trying to run container I’m getting:
./run.sh: 21: source: Permission denied
./run.sh: 23: streamlit: Permission denied
was not started when the signal was sent or it has already been stopped
I have no clue why it is dropping error about permissions .
Dockerfile:
FROM python:3.11-slim
# This prevents Python from writing out pyc files
ENV PYTHONDONTWRITEBYTECODE=1
# This keeps Python from buffering stdin/stdout
ENV PYTHONUNBUFFERED=1
# avoid stuck build due to user prompt
ARG DEBIAN_FRONTEND=noninteractive
ENV LOG_LEVEL="" \
LOG_SAMPLING_RATE="" \
CURRENT_REGION="" \
POWERTOOLS_SERVICE_NAME="" \
SMB_USERNAME_SSM_PARAMETER_NAME="" \
SMB_PASSWORD_SSM_PARAMETER_NAME="" \
VIRTUAL_ENV=/home/docker_user/venv \
PATH="/home/docker_user/venv/bin:$PATH" \
PATH="/root/.cargo/bin:$PATH"
RUN apt-get update && apt-get install curl -y && \
rm -rf /var/lib/apt/lists/*
# install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# set up a virtual env to use for whatever app is destined for this container.
RUN uv venv --python 3.11.9 ${VIRTUAL_ENV}
# install requirements
COPY requirements.txt .
RUN uv pip install -r requirements.txt
RUN groupadd -g 1001 docker_group && \
useradd -u 1001 -g 1001 -d /home/docker_user -ms /bin/bash -c "Docker image user" docker_user
COPY run.sh /home/docker_user
RUN chown -R docker_user:docker_group /home/docker_user
RUN chmod -R 755 /home/docker_user
USER docker_user
WORKDIR /home/docker_user
COPY admin.py /home/docker_user/app
EXPOSE 8083
ENTRYPOINT [ "./run.sh"]