forked from breatheco-de/apiv2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.dev.Dockerfile
44 lines (33 loc) · 983 Bytes
/
.dev.Dockerfile
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
# alpine has very much issues with python
FROM python:slim
EXPOSE 8000
RUN echo breathecode > /etc/hostname
RUN apt-get update && \
apt-get install fish curl git sudo tmux vim nano -y && \
apt-get clean && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/* /tmp/*
WORKDIR /tmp
RUN curl -L https://get.oh-my.fish > install && \
fish install --noninteractive --yes && \
rm install
RUN useradd shell
RUN echo 'shell ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN usermod -s /usr/bin/fish root
RUN usermod -s /usr/bin/fish shell
USER shell
WORKDIR /home/shell/apiv2
ENV PYTHONUNBUFFERED=1
ENV PATH="${PATH}:/home/shell/.local/bin"
ENV DOCKER=1
RUN curl -L https://get.oh-my.fish > install && \
fish install --noninteractive --yes && \
rm install
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
COPY scripts scripts
COPY .git/ .git/
RUN touch .env
RUN python -m scripts.install && \
rm .env
COPY . .
CMD python -m scripts.docker_entrypoint_dev