aboutsummaryrefslogtreecommitdiff
path: root/ci-amd64-llp-alpine/Dockerfile
blob: 0a5e28af0e22476b84df7f170a74ca0acae38cf7 (plain)
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
FROM alpine

ARG APP_VERSION=?
ENV APP_VERSION=$APP_VERSION
ENV APPDIR=/srv/linaro-license-protection
ENV PORT=8080
ENV LLP_APP=linaro-license-protection.wsgi_production
ENV DJANGO_SETTINGS_MODULE=settings_production

# Setup django application
RUN mkdir -p $APPDIR

WORKDIR $APPDIR

RUN apk update && \
  apk --no-cache add python2 py2-pip mysql-client git py-gunicorn sqlite && \
  apk --no-cache add gcc g++ python2-dev musl-dev libffi-dev postgresql-dev && \
  git clone https://git.linaro.org/infrastructure/linaro-license-protection.git/ $APPDIR && \
  pip2 install --upgrade pip setuptools six && \
  pip2 install -U -r $APPDIR/requirements.txt && \
  apk del gcc g++ python3-dev musl-dev libffi-dev

EXPOSE $PORT

# Start gunicorn
COPY ./ /srv
WORKDIR /srv
CMD ["/srv/docker_run.sh"]