2021-11-08 22:12:57 +01:00
|
|
|
# Dockerfile for a generic Debian/Ubuntu image with just the basics we
|
|
|
|
# need to make it suitable for CI. In particular:
|
2017-09-20 01:36:00 +02:00
|
|
|
# * a non-root user to run as (a pain to try to do in setup,
|
|
|
|
# because by then we've already cloned the repo);
|
|
|
|
# * Git and other basic utilities.
|
|
|
|
|
2021-11-08 22:12:57 +01:00
|
|
|
# To rebuild from this file for a given release, say Ubuntu 20.04 focal:
|
|
|
|
# docker build . --build-arg=BASE_IMAGE=ubuntu:20.04 --pull --tag=zulip/ci:focal
|
|
|
|
# docker push zulip/ci:focal
|
2021-11-05 23:35:39 +01:00
|
|
|
#
|
|
|
|
# tools/ci/build-docker-images will rebuild all images, but not push them.
|
2017-12-02 02:13:26 +01:00
|
|
|
|
2021-06-24 21:52:53 +02:00
|
|
|
ARG BASE_IMAGE
|
|
|
|
FROM $BASE_IMAGE
|
2017-09-20 01:36:00 +02:00
|
|
|
|
2021-07-13 22:03:32 +02:00
|
|
|
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
2017-09-20 01:36:00 +02:00
|
|
|
|
2021-07-13 22:03:32 +02:00
|
|
|
# Set the locale.
|
2021-04-30 21:57:25 +02:00
|
|
|
ENV LC_ALL C.UTF-8
|
2017-09-20 01:36:00 +02:00
|
|
|
|
2021-07-13 22:03:32 +02:00
|
|
|
# Extra packages used by Zulip.
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get -y install --no-install-recommends \
|
|
|
|
build-essential \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
gettext \
|
|
|
|
git \
|
|
|
|
hunspell-en-us \
|
|
|
|
jq \
|
|
|
|
libffi-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
libjpeg-dev \
|
|
|
|
libldap2-dev \
|
|
|
|
libpq-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt1-dev \
|
|
|
|
locales \
|
|
|
|
memcached \
|
|
|
|
moreutils \
|
|
|
|
puppet \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
|
|
|
rabbitmq-server \
|
|
|
|
redis-server \
|
|
|
|
sudo \
|
|
|
|
supervisor \
|
|
|
|
unzip \
|
|
|
|
xvfb \
|
|
|
|
zlib1g-dev
|
2021-04-02 11:04:05 +02:00
|
|
|
|
2020-06-26 20:41:34 +02:00
|
|
|
ARG USERNAME=github
|
2021-10-14 03:47:03 +02:00
|
|
|
RUN groupadd --gid 1001 $USERNAME \
|
|
|
|
&& useradd --uid 1001 --gid $USERNAME --shell /bin/bash --create-home $USERNAME \
|
2020-06-26 20:41:34 +02:00
|
|
|
&& echo "$USERNAME ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers.d/50-$USERNAME \
|
2017-09-20 01:36:00 +02:00
|
|
|
&& echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
|
|
|
|
|
2020-06-26 20:41:34 +02:00
|
|
|
USER $USERNAME
|
2017-09-20 01:36:00 +02:00
|
|
|
|
|
|
|
CMD ["/bin/sh"]
|