forked from anecdotes-ai/snowflake-query
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (22 loc) · 645 Bytes
/
Dockerfile
File metadata and controls
27 lines (22 loc) · 645 Bytes
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
FROM python:3.10-slim
RUN apt-get update && \
apt-get install -y git && \
python3 -m pip install --upgrade pip
# Configure environments vars. Overriden by GitHub Actions
ENV INPUT_SNOWFLAKE_ACCOUNT=
ENV INPUT_SNOWFLAKE_USERNAME=
ENV INPUT_SNOWFLAKE_PASSWORD=
ENV INPUT_SNOWFLAKE_WAREHOUSE=
ENV INPUT_QUERIES=
ENV APP_DIR=/app
WORKDIR ${APP_DIR}
# setup python environ
COPY ./requirements.txt ${APP_DIR}
RUN pip install -r ${APP_DIR}/requirements.txt
# copy app files
COPY . ./
RUN useradd -ms /bin/bash anecdotes
RUN chown -R anecdotes:anecdotes /app
USER anecdotes
# command to run in container start
CMD python ${APP_DIR}/main.py