Skip to content
Snippets Groups Projects
Commit 1a6a1c15 authored by erichard's avatar erichard
Browse files

copy docker files from codeguards

parent f1eb182d
No related branches found
No related tags found
1 merge request!61Packager labelstower
# Version DEV
FROM python:3.6.6-slim-stretch
# Ensure use of bash
SHELL ["/bin/bash","-c"]
# Sqlite3
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -yq apt-utils \
&& apt-get install -yq sqlite3 \
&& apt-get install -yq curl \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install flask
RUN pip3 install --upgrade pip setuptools wheel
COPY requirements.txt requirements.txt
RUN pip3 install --trusted-host pypi.python.org -r requirements.txt
# Run flask in development mode
EXPOSE 5000
ENV FLASK_APP=demo_blog
ENV FLASK_ENV=development
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV APP_SETTINGS="demo_blog.config.DevelopmentConfig"
ENV APP_MAIL_SERVER="lalrelay.in2p3.fr"
ENV APP_MAIL_USERNAME="coding-pool-smtp@lal.in2p3.fr"
ENV APP_MAIL_PASSWORD="C0dingP00l"
ENV CODEGUARDS_ENV='demo_blog.config.DevelopmentConfig'
# Version DEMO
FROM codeguards:dev
# Ensure use of bash
SHELL ["/bin/bash","-c"]
# Install codeguards
RUN pip3 install --upgrade pip setuptools wheel
COPY codeguards-latest-py3-none-any.whl codeguards-latest-py3-none-any.whl
RUN pip3 install codeguards-latest-py3-none-any.whl
# Run flask
EXPOSE 5000
ENV FLASK_APP=demo
ENV FLASK_ENV=development
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV APP_SETTINGS="demo_blog.config.DevelopmentConfig"
ENV APP_MAIL_SERVER="lalrelay.in2p3.fr"
ENV APP_MAIL_USERNAME="coding-pool-smtp@lal.in2p3.fr"
ENV APP_MAIL_PASSWORD="C0dingP00l"
ENV CODEGUARDS_ENV='test.demo.config.DevelopmentConfig'
CMD [ "flask", "run", "--reload", "--host", "0.0.0.0" ]
\ No newline at end of file
#!/usr/bin/env bash
# This ensures that we are in this script directory,
# even if we call it from another one.
SCRIPT_NAME=${BASH_SOURCE[0]}
cd `dirname ${SCRIPT_NAME}`
docker build -f Dockerfile_externals -t codeguards:dev .
# --force-rm --no-cache
#!/usr/bin/env bash
# This ensures that we are in this script directory,
# even if we call it from another one.
SCRIPT_NAME=${BASH_SOURCE[0]}
cd `dirname ${SCRIPT_NAME}`
# Get current codeguards package
version=`cat ../dist/version.txt`
cp ../dist/codeguards-${version}-py3-none-any.whl codeguards-latest-py3-none-any.whl
docker build -f Dockerfile_latest -t codeguards:demo .
# --force-rm --no-cache
# cleaning
rm -f codeguards-latest-py3-none-any.whl
\ No newline at end of file
#!/usr/bin/env bash
# This ensures that we are in this script directory,
# even if we call it from another one.
SCRIPT_NAME=${BASH_SOURCE[0]}
cd `dirname ${SCRIPT_NAME}`
# Flask opère sur le port 5000
docker run -it --rm -p 5000:5000 -v $PWD/..:/work -w /work codeguards:dev $*
\ No newline at end of file
#!/usr/bin/env bash
# This ensures that we are in this script directory,
# even if we call it from another one.
SCRIPT_NAME=${BASH_SOURCE[0]}
cd `dirname ${SCRIPT_NAME}`
# Flask opère sur le port 5000
docker run -it --rm -p 5000:5000 -v $PWD/..:/work -w /work/test codeguards:demo $*
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment