forked from AlmaLinux/alts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.celery
28 lines (26 loc) · 1.22 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
FROM almalinux:8
ARG ARCH="amd64"
ARG TF_VERSION="1.0.6"
RUN mkdir -p /code ~/.terraform.d/plugin-cache ~/.ssh /srv/celery_results \
&& echo "plugin_cache_dir = \"\$HOME/.terraform.d/plugin-cache\"" > ~/.terraformrc \
&& yum update -y \
&& yum install -y python3-virtualenv epel-release wget unzip yum-utils openssh-clients \
&& yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo \
&& yum install -y docker-ce docker-ce-cli containerd.io ansible --enablerepo=epel \
&& yum clean all \
&& cat /dev/zero | ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -q -N ""
RUN wget -q https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_${ARCH}.zip \
-O /tmp/terraform_linux_${ARCH}.zip \
&& unzip /tmp/terraform_linux_${ARCH}.zip -d /usr/local/bin \
&& chmod 755 /usr/local/bin/terraform \
&& rm -f /tmp/terraform_linux_${ARCH}.zip
COPY requirements/ /tmp/requirements
RUN cd /code \
&& virtualenv -p python3.6 env \
&& source env/bin/activate \
&& pip3 install --no-cache -U pip setuptools \
&& pip3 install --no-cache -r /tmp/requirements/celery.txt \
&& deactivate \
&& rm -rf /tmp/requirements
COPY . /code
WORKDIR /code