# This is nrao:capability ARG TAGNAME="tmp" FROM cache:${TAGNAME} # Build arg that sets environment; sets to "dev" if no build arg is given ARG env=dev ENV ENV=${env} # Change working directory to /code WORKDIR /code # set ownership of /code directory to vlapipe:vlapipe RUN chown vlapipe . && chgrp vlapipe . # Switch to vlapipe USER vlapipe # Copy service directory to /code in the image # set ownership of content to vlapipe and the vlapipe group COPY --chown=vlapipe:vlapipe ./services/capability ./ ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local" ENV PATH "${PATH}:/home/vlapipe/.local/bin" RUN python setup.py develop --user # Set Capo for build stage # Gets reset to proper environment's profile in the deploy stage ENV CAPO_PROFILE docker CMD pserve --reload ${ENV}.ini