-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile.celery
58 lines (48 loc) · 1.25 KB
/
Dockerfile.celery
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
55
56
57
58
FROM almalinux:9
RUN <<EOT
set -ex
dnf upgrade -y
dnf install -y epel-release yum-utils openssh-clients wget unzip
dnf config-manager --set-enabled crb
EOT
# Install Docker
RUN <<EOT
set -ex
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce
EOT
# Install Ansible
RUN <<EOT
set -ex
dnf install -y ansible
ansible-galaxy collection install community.general community.docker ansible.posix
EOT
# Install Terraform
RUN <<EOT
set -ex
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
dnf install -y terraform
mkdir -p /root/.terraform.d/plugin-cache
echo 'plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"' >> /root/.terraformrc
echo "plugin_cache_may_break_dependency_lock_file = true" >> /root/.terraformrc
EOT
RUN dnf clean all
RUN <<EOT
set -ex
ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -q -N ''
update-crypto-policies --set LEGACY
EOT
WORKDIR /code
COPY requirements .
RUN <<EOT
set -ex
python3 -m venv /root/ansible_env
source /root/ansible_env/bin/activate
pip3 install -r celery.txt ansible-core==2.15.12
EOT
RUN <<EOT
set -ex
python3 -m ensurepip
pip3 install -r celery.txt
EOT
RUN rm -rf *.txt ~/.cache/pip