File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,23 @@ ARG IMAGE_TAG=image_tag \
77ENV BUILD_TAG=${IMAGE_TAG}
88
99RUN addgroup --system mesh && adduser --ingroup mesh --system mesh
10- COPY . /mesh-forwarder
10+
11+ # This sets the working directory for ALL subsequent RUNs and for ENTRYPOINT
12+ WORKDIR ${FORWARDER_HOME}
13+
14+ # Copy project into WORKDIR (so src is at /mesh-forwarder/src)
15+ COPY . .
1116
1217RUN python -m venv /opt/venv
1318ENV PATH="/opt/venv/bin:$PATH"
19+
1420RUN pip install pipenv
15- RUN cd /mesh-forwarder && pipenv install
1621
17- RUN chown -R mesh:mesh /mesh-forwarder
22+ # Install dependencies into the current env instead of creating another venv
23+ RUN pipenv install --deploy --system
1824
25+ RUN chown -R mesh:mesh ${FORWARDER_HOME}
1926USER mesh
2027
28+ # Now that CWD=/mesh-forwarder and src/ exists there, this works:
2129ENTRYPOINT ["python" , "-m" , "src.awsmesh.entrypoint" ]
You can’t perform that action at this time.
0 commit comments