This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile
52 lines (42 loc) · 1.55 KB
/
Dockerfile
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
# python:3.8-slim-bullseye
ARG BASE_IMAGE=python@sha256:bb908c726535fc6787a69d4ef3cdb5ee90dc5edeae56da3181b2108539a5eb64
FROM $BASE_IMAGE
ARG DBT_PIP_FLAGS
ARG DBT_CORE_PACKAGE
ARG DBT_DATABASE_ADAPTER_PACKAGE
ARG DATADOG_PACKAGE
RUN apt-get -y update && apt-get -y upgrade && \
apt-get -y update --fix-missing && \
apt-get -y install && apt-get -y upgrade && \
apt-get -y install software-properties-common && \
apt-get -y install curl && \
apt-get -y install iputils-ping &&\
apt-get -y install git libpq-dev openssh-client openssl && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
RUN groupadd -g 999 restricted && \
useradd -s /bin/sh \
-m -d /home/restricted \
-r -u 999 -g restricted restricted
COPY ./bash /usr/src/app/bash
# Copy celery config and serviced.
COPY ./configs/celeryd /etc/default/celeryd
COPY ./bash/celeryd.sh /etc/init.d/celeryd
# Create celery worker user.
RUN groupadd celery && useradd celery -g celery
# Install redis server.
RUN /usr/src/app/bash/ubuntu-setup-redis.sh
COPY requirements.txt /usr/src/app
RUN pip install --upgrade pip
RUN pip install \
--no-cache-dir \
--upgrade \
-r requirements.txt \
${DBT_PIP_FLAGS} \
${DBT_CORE_PACKAGE} \
${DBT_DATABASE_ADAPTER_PACKAGE} \
${DATADOG_PACKAGE}
RUN pip install --force-reinstall MarkupSafe==2.0.1 # TODO: find better fix for this
COPY ./dbt_server /usr/src/app/dbt_server
COPY ./dbt_worker /usr/src/app/dbt_worker