Skip to content

Commit

Permalink
updating variable syntax and pinning botocore version
Browse files Browse the repository at this point in the history
  • Loading branch information
EliseCastle23 committed Nov 12, 2024
1 parent 6e4c9b3 commit 8f8600a
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 135 deletions.
14 changes: 6 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ ARG AZLINUX_BASE_VERSION=master

FROM quay.io/cdis/python-nginx-al:${AZLINUX_BASE_VERSION} AS base

# FROM 707767160287.dkr.ecr.us-east-1.amazonaws.com/gen3/python-nginx-al2:feat_python-nginx AS base

ENV appname=peregrine

WORKDIR /${appname}

RUN chown -R gen3:gen3 /$appname
RUN chown -R gen3:gen3 /${appname}

# Builder stage
FROM base AS builder
Expand All @@ -19,22 +17,22 @@ COPY poetry.lock pyproject.toml /${appname}/

RUN poetry install -vv --only main --no-interaction

COPY --chown=gen3:gen3 . /$appname
COPY --chown=gen3:gen3 . /${appname}

# Run poetry again so this app itself gets installed too
RUN poetry install --without dev --no-interaction

RUN git config --global --add safe.directory /${appname} && COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" > /$appname/version_data.py \
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >> /$appname/version_data.py
RUN git config --global --add safe.directory /${appname} && COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" > /${appname}/version_data.py \
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >> /${appname}/version_data.py

# Final stage
FROM base

COPY --from=builder /$appname /$appname
COPY --from=builder /${appname} /${appname}

# Switch to non-root user 'gen3' for the serving process
USER gen3

WORKDIR /$appname
WORKDIR /${appname}

CMD ["/bin/bash", "-c", "/${appname}/dockerrun.bash"]
Loading

0 comments on commit 8f8600a

Please sign in to comment.