-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (22 loc) · 777 Bytes
/
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
FROM python:3.6 as builder
# Set the GOOGLE_APPLICATION_CREDENTIALS environment variable.
# At run time, /credentials must be binded to a volume containing a valid
# Service Account credentials file named datacatalog-custom-entries-manager.json.
ENV GOOGLE_APPLICATION_CREDENTIALS=/credentials/datacatalog-custom-entries-manager.json
WORKDIR /app
# Copy project files (see .dockerignore).
COPY . .
# QUALITY ASSURANCE
FROM builder as qa
# Run static code checks.
RUN pip install flake8 yapf
RUN yapf --diff --recursive src tests
RUN flake8 src tests
# Run the unit tests.
RUN python setup.py test
# END OF QUALITY ASSURANCE STEPS
# RESUME THE IMAGE BUILD PROCESS
FROM builder as run
# Install the package.
RUN pip install .
ENTRYPOINT ["datacatalog-custom-entries"]