-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (44 loc) · 1.68 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (44 loc) · 1.68 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM debian:13.6-slim
# Bumped by the check-azcopy workflow (PR on each new azcopy release).
ARG AZCOPY_VERSION=10.32.7
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
ca-certificates \
openssh-client \
tar \
gzip \
curl \
git \
python3 \
python3-pip \
gnupg \
&& curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
| gpg --dearmor -o /usr/share/keyrings/pgdg.gpg \
&& . /etc/os-release \
&& echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt ${VERSION_CODENAME}-pgdg main" \
> /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client-18 \
rsync \
isync \
procps \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSL -o /tmp/azcopy.tar.gz "https://github.com/Azure/azure-storage-azcopy/releases/download/v${AZCOPY_VERSION}/azcopy_linux_amd64_${AZCOPY_VERSION}.tar.gz" \
&& tar -xzf /tmp/azcopy.tar.gz -C /tmp \
&& install -m 0755 "/tmp/azcopy_linux_amd64_${AZCOPY_VERSION}/azcopy" /usr/local/bin/azcopy \
&& rm -rf /tmp/azcopy.tar.gz "/tmp/azcopy_linux_amd64_${AZCOPY_VERSION}"
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir --break-system-packages -r /tmp/requirements.txt \
&& rm /tmp/requirements.txt
RUN groupadd --system clouddump \
&& useradd --system --gid clouddump --create-home clouddump \
&& mkdir -p /backup /config \
&& chown clouddump:clouddump /backup
COPY clouddump/ /app/clouddump/
WORKDIR /app
ENV PYTHONUNBUFFERED=1
EXPOSE 8080
USER clouddump
CMD ["python3", "-m", "clouddump"]