taskcluster/docker/funsize-update-generator/Dockerfile
author Olli Pettay <Olli.Pettay@helsinki.fi>
Fri, 31 Mar 2017 22:54:41 -0400
changeset 350837 fde6f9f9ef00690f68afaca2e67523bf817f6e8d
parent 345702 f65f60dc44c28818755887379184d0ffe6d817e7
child 372331 e1b93d2abdb2968279ea2512aded7bd77c53a1c7
permissions -rw-r--r--
Bug 1352389, don't push extra script blocker on stack when setting attributes, r=bz

FROM ubuntu:vivid
MAINTAINER Rail Aliiev <rail@mozilla.com>

# Required software
ENV DEBIAN_FRONTEND noninteractive
# Chain apt-get commands with apt-get clean in a single docker RUN
# to make sure that files are removed within a single docker layer
RUN apt-get update -q && \
    apt-get install -yyq --no-install-recommends \
    python python-setuptools python-cryptography  libgetopt-simple-perl \
    bzip2 clamav clamav-freshclam python-requests python-sh curl && \
    apt-get clean
RUN useradd -d /home/worker -s /bin/bash -m worker
COPY requirements.txt /tmp/
# python-pip installs a lot of dependencies increasing the size of an image
# drastically. Using easy_install saves us almost 200M.
RUN easy_install pip
RUN pip install -r /tmp/requirements.txt

# scripts
RUN mkdir /home/worker/bin
COPY scripts/* /home/worker/bin/
COPY runme.sh /runme.sh
RUN chmod 755 /home/worker/bin/* /runme.sh
RUN mkdir /home/worker/keys
COPY *.pubkey /home/worker/keys/
# Freshclam may be flaky, retry if it fails
RUN for i in 1 2 3 4 5; do freshclam --verbose && break || sleep 15; done

ENV           HOME          /home/worker
ENV           SHELL         /bin/bash
ENV           USER          worker
ENV           LOGNAME       worker