jason137 commited on
Commit
bdc8b30
·
1 Parent(s): 2035a6b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -10
Dockerfile CHANGED
@@ -1,21 +1,27 @@
1
- # FROM ubuntu:latest
2
  FROM postgres:latest
3
- WORKDIR /app
 
4
 
5
  RUN apt-get -y update
6
  RUN apt-get -y install git
7
  RUN git clone https://github.com/dbt-labs/jaffle_shop.git
 
8
 
9
- FROM python:latest
10
- # WORKDIR /jaffle_shop
11
- COPY /jaffle_shop/* .
12
- COPY requirements.txt .
 
 
 
 
 
13
  COPY profiles.yml .
14
- RUN ls
15
 
16
- # ENV POSTGRES_HOST_AUTH_METHOD=trust
17
- # ENV DBT_PROFILES_DIR=/jaffle_shop
18
- # RUN pip install -r requirements.txt
 
19
  # RUN dbt debug
20
 
21
  # RUN dbt seed
 
 
1
  FROM postgres:latest
2
+ WORKDIR /code
3
+ COPY ./requirements.txt /code/requirements.txt
4
 
5
  RUN apt-get -y update
6
  RUN apt-get -y install git
7
  RUN git clone https://github.com/dbt-labs/jaffle_shop.git
8
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
10
+ RUN useradd -m -u 1000 user
11
+ USER user
12
+ ENV HOME=/home/user \\
13
+ PATH=/home/user/.local/bin:$PATH
14
+
15
+ WORKDIR $HOME/app
16
+ # COPY --chown=user . $HOME/app
17
+
18
+ COPY ./jaffle_shop/* .
19
  COPY profiles.yml .
 
20
 
21
+ ENV POSTGRES_HOST_AUTH_METHOD=trust
22
+ ENV DBT_PROFILES_DIR=/jaffle_shop
23
+
24
+ RUN ls
25
  # RUN dbt debug
26
 
27
  # RUN dbt seed