Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ARG version=16.04
  2. FROM ubuntu:${version}
  3. ARG version
  4. ARG GEARMAN_REPO=https://github.com/gearman/gearmand
  5. LABEL description="Gearman Job Server Image (Ubuntu ${version})"
  6. LABEL maintainer="Gearmand Developers https://github.com/gearman/gearmand"
  7. LABEL version="https://github.com/gearman/gearmand/tree/master Ubuntu ${version}"
  8. # Configure environment
  9. ENV DEBIAN_FRONTEND=noninteractive \
  10. HOME=/root
  11. # Install packages
  12. RUN apt-get update \
  13. && apt-get -y upgrade \
  14. && apt-get -y install \
  15. automake \
  16. autoconf \
  17. libtool \
  18. make \
  19. curl \
  20. gcc \
  21. g++ \
  22. git \
  23. gperf \
  24. libssl-dev \
  25. libboost-all-dev \
  26. libevent-dev \
  27. libhiredis-dev \
  28. libpq-dev \
  29. libtokyocabinet-dev \
  30. tcsh \
  31. python3-sphinx \
  32. uuid-dev \
  33. wget \
  34. && apt-get clean autoclean \
  35. && apt-get -y autoremove \
  36. && rm -rf /var/lib/apt/lists/*
  37. # Switch to a non-root user
  38. RUN adduser --no-create-home --disabled-password --gecos '' --shell /bin/bash gearman
  39. USER gearman
  40. # Clone the GitHub repository master branch
  41. ENV HOME=/tmp
  42. RUN cd /tmp && git clone --depth 1 --branch master ${GEARMAN_REPO}.git
  43. # Bootstrap, configure, make, and make test
  44. WORKDIR /tmp/gearmand
  45. RUN ./bootstrap.sh -a
  46. RUN ./configure --enable-ssl 2>&1 | tee ./configure.log
  47. RUN make 2>&1 | tee ./build.log
  48. RUN make test 2>&1 | tee ./test.log