-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (28 loc) · 1.12 KB
/
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
FROM python:3.6-alpine
RUN apk --no-cache add git
# add a non-root user and give them ownership
RUN adduser -D -u 9000 app && \
# repo
mkdir /repo && \
chown -R app:app /repo && \
# app code
mkdir /usr/src/app && \
chown -R app:app /usr/src/app
# add the pullrequest utility to easily create pull requests on different git hosts
WORKDIR /usr/src/app
ENV PULLREQUEST_VERSION=2.0.0-alpha.11
ADD https://github.com/dependencies-io/pullrequest/releases/download/${PULLREQUEST_VERSION}/pullrequest_${PULLREQUEST_VERSION}_linux_amd64.tar.gz .
RUN mkdir pullrequest && \
tar -zxvf pullrequest_${PULLREQUEST_VERSION}_linux_amd64.tar.gz -C pullrequest && \
ln -s /usr/src/app/pullrequest/pullrequest /usr/local/bin/pullrequest
# add pipenv reference PipFile implementation
RUN easy_install pip \
&& pip install --upgrade pip \
&& pip install pipenv
# run everything from here on as non-root
USER app
RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Dependencies.io Bot"
ADD src/ /usr/src/app/
WORKDIR /repo
ENTRYPOINT ["python", "/usr/src/app/entrypoint.py"]