You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The thing is it needs to be user specific. In slim builds the user is root:
ENV POETRY_HOME=/root/.poetry
RUN curl -sSL https://install.python-poetry.org | python -
ENV PATH "$POETRY_HOME/bin:$PATH"
RUN poetry config virtualenvs.create false
The thing is it needs to be user specific. In dev builds we need to install as the vscode user, not as root:
USER vscode
ENV POETRY_HOME=/home/vscode/.poetry
RUN curl -sSL https://install.python-poetry.org | python -
ENV PATH "$POETRY_HOME/bin:$PATH"
RUN poetry config virtualenvs.create false
EITHER
I'm not sure if a sensible thing might be to include additional stages to the build, so instead of:
builder
slim (which is actually both slim and dev)
We do:
builder from ${BASE_IMAGE}
common from ${BASE_IMAGE}
slim from common
dev from common
This will result in a small amount of duplicate code for the poetry installation, but will allow you to remove all the annoying if conditionals in for the dev tools.
OR
Experiment a bit and see if you can define the USER value based on a bash expression (root or vscode). Then do ENV POETRY_HOME=$HOME/.poetry.
The text was updated successfully, but these errors were encountered:
We need to install poetry, and pin the version.
The thing is it needs to be user specific. In
slim
builds the user is root:The thing is it needs to be user specific. In
dev
builds we need to install as thevscode
user, not as root:EITHER
I'm not sure if a sensible thing might be to include additional stages to the build, so instead of:
builder
slim
(which is actually bothslim
anddev
)We do:
builder
from ${BASE_IMAGE}common
from ${BASE_IMAGE}slim
fromcommon
dev
fromcommon
This will result in a small amount of duplicate code for the poetry installation, but will allow you to remove all the annoying
if
conditionals in for the dev tools.OR
Experiment a bit and see if you can define the
USER
value based on a bash expression (root
orvscode
). Then doENV POETRY_HOME=$HOME/.poetry
.The text was updated successfully, but these errors were encountered: