-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (25 loc) · 1.05 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
FROM python:3.11
ENV CRANE_VER=v0.20.2
RUN mkdir -p /cdmtaskservice && mkdir -p /craneinstall
# Install crane
WORKDIR /craneinstall
# crane install docs: https://github.com/google/go-containerregistry/blob/main/cmd/crane/README.md
# Note that the provenance verification step is broken, which wasted an hour or two of time
# https://github.com/google/go-containerregistry/issues/1982
RUN curl -sL https://github.com/google/go-containerregistry/releases/download/$CRANE_VER/go-containerregistry_Linux_x86_64.tar.gz > go-containerregistry.tar.gz \
&& tar -zxvf go-containerregistry.tar.gz \
&& mv ./crane /cdmtaskservice \
&& rm -r /craneinstall
ENV KBCTS_CRANE_PATH=/cdmtaskservice/crane
# install pipenv
RUN pip install --upgrade pip && \
pip install pipenv
WORKDIR /cdmtaskservice
# install deps
COPY Pipfile* ./
RUN pipenv sync --system
COPY ./ /cdmtaskservice
# Write the git commit for the service
ARG VCS_REF=no_git_commit_passed_to_build
RUN echo "GIT_COMMIT=\"$VCS_REF\"" > cdmtaskservice/git_commit.py
ENTRYPOINT ["scripts/entrypoint.sh"]