-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile-ubuntu
38 lines (32 loc) · 1.16 KB
/
Dockerfile-ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 2020 Canonical Ltd.
# Licensed under the AGPLv3, see LICENCE file for details.
ARG BASE_IMAGE
FROM $BASE_IMAGE
# Add the juju and sjuju user for rootless agents.
# 170 and 171 uid/gid is sourced from juju/juju
RUN groupadd --gid 170 juju
RUN useradd --uid 170 --gid 170 --no-create-home --shell /usr/bin/bash juju
RUN groupadd --gid 171 sjuju
RUN useradd --uid 171 --gid 171 --no-create-home --shell /usr/bin/bash sjuju
RUN mkdir -p /etc/sudoers.d && echo "sjuju ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/sjuju
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
sudo \
python3-yaml \
python3-pip \
python3-distutils \
# for debug-hooks.
tmux byobu \
# below apt dependencies are required by controller pod.
iproute2 \
curl \
&& pip3 install --upgrade pip setuptools \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /root/.cache
# Install the standard charm dependencies.
ENV WHEELHOUSE=/tmp/wheelhouse
ENV PIP_WHEEL_DIR=/tmp/wheelhouse
ENV PIP_FIND_LINKS=/tmp/wheelhouse
COPY requirements.txt /tmp/wheelhouse/requirements.txt
RUN pip3 install -r /tmp/wheelhouse/requirements.txt
ENTRYPOINT ["sh", "-c"]