This repository has been archived by the owner on Nov 4, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from selevit/optimize_docker_images
Optimize docker images
- Loading branch information
Showing
21 changed files
with
104 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
FROM ubuntu:14.04 | ||
ENV BUILD_DATE=10_05_2016 | ||
ENV TERM=xterm | ||
RUN apt-get update | ||
RUN apt-get install -y software-properties-common python-software-properties curl | ||
RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | ||
RUN apt-get install -y nodejs git git-core gcc make build-essential | ||
RUN npm install -g nodemon mocha | ||
FROM node:7-alpine | ||
|
||
ENV NODE_PATH=.:/usr/lib/node_modules:/node_modules | ||
ADD ./package.json /package.json | ||
RUN mkdir -p /node_modules | ||
RUN npm install --prefix / | ||
ADD ./app /app | ||
|
||
RUN set -x && \ | ||
npm install --silent -g nodemon mocha && \ | ||
mkdir -p /node_modules | ||
|
||
COPY ./package.json /package.json | ||
RUN npm install --silent --prefix / | ||
|
||
COPY ./app /app | ||
WORKDIR /app | ||
|
||
EXPOSE 8080 | ||
CMD ["node", "/app/app.js"] | ||
CMD ["node", "/app/app.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
FROM python:3.5.2 | ||
|
||
COPY requirements.txt /tmp/ | ||
|
||
RUN pip install -r /tmp/requirements.txt | ||
FROM python:3.5-alpine | ||
|
||
RUN mkdir /usr/giphy-bot | ||
WORKDIR /usr/giphy-bot/ | ||
|
||
COPY requirements.txt /tmp/ | ||
RUN pip install -r /tmp/requirements.txt | ||
COPY main.py /usr/giphy-bot/ | ||
|
||
WORKDIR /usr/giphy-bot/ | ||
|
||
EXPOSE 8080 | ||
|
||
CMD python main.py | ||
CMD ["python", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
FROM python:3.5.2 | ||
|
||
COPY requirements.txt /tmp/ | ||
|
||
RUN pip install -r /tmp/requirements.txt | ||
FROM python:3.5-alpine | ||
|
||
RUN mkdir /usr/grabpage-bot | ||
WORKDIR /usr/grabpage-bot/ | ||
|
||
COPY requirements.txt /tmp/ | ||
RUN pip install -r /tmp/requirements.txt | ||
COPY main.py /usr/grabpage-bot/ | ||
|
||
WORKDIR /usr/grabpage-bot/ | ||
|
||
EXPOSE 8080 | ||
|
||
CMD python main.py | ||
CMD ["python", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM python | ||
FROM python:3.5-alpine | ||
RUN pip install flask | ||
CMD echo "import this,re,flask,json,base64\na=flask.Flask(__name__)\ng64=b'IVtndWlkb10oaHR0cHM6Ly9wYnMudHdpbWcuY29tL3Byb2ZpbGVfaW1hZ2VzLzQyNDQ5NTAwNC9HdWlkb0F2YXRhcl80MDB4NDAwLmpwZykK'\ng=base64.b64decode(g64).decode('utf-8')\nz=''.join([this.d.get(c,c) for c in this.s])\nf_g=lambda s:re.search('.*?(guido|гвидо)',s,re.I) is not None\nm_a=lambda r:f_g(r.get('text','')) and r.get('username','')!='rt-bot'\ndef h():return (json.dumps({'text':g+z, 'bot': 'g-bot'}),201) if m_a(flask.request.json) else ('',417)\na.route('/event',methods=['POST'])(h)\na.run('0.0.0.0',8080)"|python | ||
CMD echo -e "import this,re,flask,json,base64\na=flask.Flask(__name__)\ng64=b'IVtndWlkb10oaHR0cHM6Ly9wYnMudHdpbWcuY29tL3Byb2ZpbGVfaW1hZ2VzLzQyNDQ5NTAwNC9HdWlkb0F2YXRhcl80MDB4NDAwLmpwZykK'\ng=base64.b64decode(g64).decode('utf-8')\nz=''.join([this.d.get(c,c) for c in this.s])\nf_g=lambda s:re.search('.*?(guido|гвидо)',s,re.I) is not None\nm_a=lambda r:f_g(r.get('text','')) and r.get('username','')!='rt-bot'\ndef h():return (json.dumps({'text':g+z, 'bot': 'g-bot'}),201) if m_a(flask.request.json) else ('',417)\na.route('/event',methods=['POST'])(h)\na.run('0.0.0.0',8080)"|python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
FROM strayge/alpine-py3-numpy-scipy | ||
|
||
RUN apk add --update --no-cache ffmpeg | ||
RUN set -x && \ | ||
apk add --update --no-cache ffmpeg && \ | ||
rm -rf /var/cache/apk/* /tmp/* | ||
|
||
COPY requirements.txt /tmp/ | ||
|
||
RUN pip3 install --no-cache-dir --disable-pip-version-check -r /tmp/requirements.txt | ||
|
||
RUN mkdir /usr/ksenks-bot/ | ||
|
||
COPY . /usr/ksenks-bot/ | ||
|
||
WORKDIR /usr/ksenks-bot/ | ||
|
||
EXPOSE 8080 | ||
|
||
CMD python3 -u main.py | ||
CMD ["python3", "-u", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
FROM python:3.5.2 | ||
FROM python:3.5-alpine | ||
|
||
COPY requirements.txt /tmp/ | ||
|
||
RUN pip install -r /tmp/requirements.txt | ||
|
||
RUN mkdir /usr/loro-bot | ||
|
||
COPY . /usr/loro-bot | ||
|
||
COPY . /usr/loro-bot | ||
WORKDIR /usr/loro-bot | ||
|
||
EXPOSE 8080 | ||
|
||
CMD gunicorn --bind 0.0.0.0:8080 wsgi:app | ||
|
||
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "wsgi:app"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
Flask==0.11.1 | ||
markovify==0.4.3 | ||
ujson==1.35 | ||
gunicorn==19.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
FROM python:3.5-alpine | ||
|
||
ADD https://github.com/disqus/disqus-python/archive/master.zip /tmp/disqus-python.zip | ||
|
||
RUN set -x && \ | ||
apk add --no-cache --virtual builddeps ca-certificates && \ | ||
cd /tmp/ && \ | ||
unzip -x /tmp/disqus-python.zip && \ | ||
cd disqus-python-master && \ | ||
python3 setup.py install && \ | ||
apk add --no-cache ca-certificates && \ | ||
rm -rf /var/cache/apk/* /tmp/* | ||
|
||
COPY requirements.txt /tmp/ | ||
|
||
RUN pip3 install --no-cache-dir --disable-pip-version-check -r /tmp/requirements.txt | ||
|
||
RUN apk --no-cache add git && cd /tmp/ && git clone https://github.com/disqus/disqus-python.git && \ | ||
cd disqus-python && python3 setup.py install | ||
|
||
RUN mkdir /usr/rtnumber-bot/ | ||
|
||
COPY . /usr/rtnumber-bot/ | ||
RUN pip install --no-cache-dir --disable-pip-version-check -r /tmp/requirements.txt | ||
|
||
WORKDIR /usr/rtnumber-bot/ | ||
COPY . /usr/rtnumber-bot | ||
WORKDIR /usr/rtnumber-bot | ||
|
||
EXPOSE 8080 | ||
|
||
CMD python3 -u main.py | ||
CMD ["python3", "-u", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
FROM ubuntu:14.04.5 | ||
FROM perl:5 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y curl | ||
RUN apt-get install -y build-essential | ||
RUN curl -L http://cpanmin.us | sudo perl - App::cpanminus | ||
RUN cpanm JSON | ||
RUN curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Mojolicious | ||
ADD http://download.cdn.yandex.net/mystem/mystem-2.1-linux3.2-64bit.tar.gz /tmp/mystem.tar.gz | ||
|
||
WORKDIR /stat-bot | ||
RUN cpanm Mojolicious JSON | ||
|
||
RUN curl -L -O http://download.cdn.yandex.net/mystem/mystem-2.1-linux3.2-64bit.tar.gz | ||
RUN tar -xvf mystem-2.1-linux3.2-64bit.tar.gz | ||
RUN chmod +x mystem | ||
COPY . /stat-bot | ||
WORKDIR /stat-bot | ||
|
||
ADD stat-bot.pl /stat-bot | ||
RUN mkdir lib | ||
ADD lib/StatBot.pm /stat-bot/lib | ||
RUN set -x && \ | ||
tar -xvf /tmp/mystem.tar.gz && \ | ||
chmod +x mystem && \ | ||
rm -rf /tmp/* | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["perl", "stat-bot.pl"] | ||
CMD ["perl", "stat-bot.pl"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
FROM java:latest | ||
FROM java:8-alpine | ||
MAINTAINER Mike Shemanskiy <mike.shemanskiy@gmail.com> | ||
|
||
RUN mkdir bot | ||
ADD src /bot/src | ||
ADD pom.xml /bot | ||
|
||
RUN wget http://ftp.fau.de/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | ||
RUN tar -zxvf apache-maven-3.3.9-bin.tar.gz | ||
RUN rm apache-maven-3.3.9-bin.tar.gz | ||
RUN mv apache-maven-3.3.9 /usr/lib/mvn | ||
|
||
ENV M2_HOME=/usr/lib/mvn | ||
ENV M2=$M2_HOME/bin | ||
ENV PATH $PATH:$JAVA_HOME:$JAVA:$M2_HOME:$M2 | ||
|
||
RUN cd /bot \ | ||
&& mvn package \ | ||
&& mv target/rtbot-0.0.1-SNAPSHOT.jar . \ | ||
&& rm -r target src pom.xml /usr/lib/mvn | ||
ADD http://ftp.fau.de/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz /tmp/ | ||
|
||
RUN cd /tmp/ && \ | ||
tar -zxvf apache-maven-3.3.9-bin.tar.gz && \ | ||
rm apache-maven-3.3.9-bin.tar.gz && \ | ||
mv apache-maven-3.3.9 /usr/lib/mvn && \ | ||
rm -rf /tmp/* && \ | ||
mkdir -p /bot | ||
|
||
ADD . /src | ||
WORKDIR /bot | ||
|
||
RUN cd /src/ && mvn -q package \ | ||
&& mv target/rtbot-0.0.1-SNAPSHOT.jar /bot \ | ||
&& rm -rf /src /usr/lib/mvn /tmp/* | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["java", "-jar", "rtbot-0.0.1-SNAPSHOT.jar"] | ||
CMD ["java", "-jar", "rtbot-0.0.1-SNAPSHOT.jar"] |