-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
53 lines (37 loc) · 1.2 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM ubuntu:21.04
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PATH="${PATH}:/root/.poetry/bin"
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
curl \
git \
make \
graphviz \
python3 \
python3-pip \
vim
RUN ln -s /usr/bin/python3 /usr/bin/python
# Install Poetry
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false
COPY poetry.lock pyproject.toml ./
RUN /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/turbot/steampipe/main/install.sh)"
RUN steampipe plugin install aws
WORKDIR /usr/src/pacu
RUN useradd -m -s /bin/bash pacu
ENV PATH "/opt/poetry/venv/bin:${PATH}"
ENV VIRTUAL_ENV "/opt/poetry/venv"
RUN mkdir -p "$VIRTUAL_ENV" \
&& chown -R pacu:pacu "$VIRTUAL_ENV"
USER pacu
RUN poetry install --no-root
RUN pip install datasette sqlite_utils awscli
RUN echo "export PATH=/opt/poetry/venv/bin:${PATH}" >> /home/pacu/.profile && \
echo "export VIRTUAL_ENV=/opt/poetry/venv" >> /home/pacu/.profile
#COPY . .
CMD ["bash", "-l"]
#CMD ["python", "-m", "pacu"]