Permission in Vscode - Docker template

Hello, I can run sudo mkdir test to create dir, but not without sudo, did I do something wrong?
10 Replies
Codercord
Codercord5w ago
<#1276045862417600534>
Category
Help needed
Product
code-server
Platform
Linux
Logs
Please post any relevant logs/error messages.
ÙwÚ
ÙwÚ5w ago
FROM ubuntu

RUN apt-get update \
&& apt-get install -y \
curl \
git \
golang \
sudo \
vim \
wget \
texlive-full \
&& rm -rf /var/lib/apt/lists/*

ARG USER=coder
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
USER ${USER}
WORKDIR /home/${USER}
FROM ubuntu

RUN apt-get update \
&& apt-get install -y \
curl \
git \
golang \
sudo \
vim \
wget \
texlive-full \
&& rm -rf /var/lib/apt/lists/*

ARG USER=coder
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
USER ${USER}
WORKDIR /home/${USER}
Phorcys
Phorcys4w ago
hello it seems that you are not creating the home directory for the user
ÙwÚ
ÙwÚ3w ago
This issue is kindda weird, but I believe because I mount a dir that non-root owned caused this issue Not really coder fault, I'll check it when I'm back home
Phorcys
Phorcys3w ago
let me know hey @ÙwÚ -- any luck?
ÙwÚ
ÙwÚ3w ago
Sorry still out of town, I'll give you a ping when I'm back if you dont mind:)
Phorcys
Phorcys3w ago
alright, no worries, just wanted to make sure!
ÙwÚ
ÙwÚ4d ago
hello just come back ok so turn out my old template, which I mount ~/repo (I own this dir, not root), was editable before, now it's not, so I may need some help find out how do I fix that @Phorcys what should I provide here? I think the content is pretty much similar to what I posted above
Phorcys
Phorcys3d ago
@ÙwÚ some of us are at Open Source Summit EU atm so the answers will likely be delayed a bit i'll come back to you next week if no one has answered your questions
ÙwÚ
ÙwÚ3d ago
oh nah all good, i dont mind the wait, I can just mount one of dir root owned for now
Want results from more Discord servers?
Add your server