ÙwÚ
ÙwÚ
Explore posts from servers
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
Ye sure, still figuring out the prebuilt, but i think should be fine
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
how would you guys do it ?
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
however this seems like not a proper way to use a pre-built image
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
then I used docker build to create image colab-env-cpp b4 hand docker build ./build -t colab-env-cpp
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
@Phorcys ok I think I found the root cause, I remember now, I wanted to use a pre-built image when create container
#image = "codercom/code-server:latest"
image = "colab-env-cpp"
#image = "codercom/code-server:latest"
image = "colab-env-cpp"
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
so the problem was because I have USER=coder ? this is the docker file created with coder cli, so im not sure how it got there
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
I do have some basics with permissions, but not much with docker
FROM ubuntu:latest
RUN mkdir /packages
RUN apt-get update && apt-get install -y apt-transport-https
COPY packages.txt "/packages/packages.txt"



RUN apt-get -y update \
&& apt-get install -y \
build-essential \
gcc-multilib \
gdb \
curl \
git \
golang \
sudo \
vim \
wget \
&& rm -rf /var/lib/apt/lists/*

#RUN xargs -a /packages/packages.txt apt-get install -y
ARG USER=coder
ARG TZ=America/Vancouver
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}

#$(cat /packages/packages.txt | tr '\n' ' ') \
FROM ubuntu:latest
RUN mkdir /packages
RUN apt-get update && apt-get install -y apt-transport-https
COPY packages.txt "/packages/packages.txt"



RUN apt-get -y update \
&& apt-get install -y \
build-essential \
gcc-multilib \
gdb \
curl \
git \
golang \
sudo \
vim \
wget \
&& rm -rf /var/lib/apt/lists/*

#RUN xargs -a /packages/packages.txt apt-get install -y
ARG USER=coder
ARG TZ=America/Vancouver
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}

#$(cat /packages/packages.txt | tr '\n' ' ') \
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
im pulling it up
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
ok im guessing it related to my dockerfile ?
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
hmm ok from the output ig wibu user doesnt exist ?
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
anyways, here's mkdir return
coder@leetcode:~$ mkdir /home/wibu/test
mkdir: cannot create directory '/home/wibu/test': Permission denied
coder@leetcode:~$ cat /etc/passwd | grep coder
coder:x:1001:1001::/home/coder:/bin/bash
coder@leetcode:~$ cat /etc/passwd | grep wibu
coder@leetcode:~$

coder@leetcode:~$ mkdir /home/wibu/test
mkdir: cannot create directory '/home/wibu/test': Permission denied
coder@leetcode:~$ cat /etc/passwd | grep coder
coder:x:1001:1001::/home/coder:/bin/bash
coder@leetcode:~$ cat /etc/passwd | grep wibu
coder@leetcode:~$

55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
Decoyer was my previous workspace, I stopped it tho
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
let decide on 1 user for now, im logging as wibu user
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
please dont worry about Decoyer/wibu, just the name different but they should have the same template config
coder@leetcode:/home/wibu/leetcode/leetcode$ id
uid=1001(coder) gid=1001(coder) groups=1001(coder),27(sudo)
coder@leetcode:/home/wibu/leetcode/leetcode$ ls /home
coder ubuntu wibu
coder@leetcode:/home/wibu/leetcode/leetcode$ stat /home/wibu
File: /home/wibu
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 8,1 Inode: 57813071 Links: 5
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-09-18 17:39:33.516648920 +0000
Modify: 2024-09-18 17:38:44.015072021 +0000
Change: 2024-09-18 17:38:44.015072021 +0000
Birth: 2024-09-15 19:33:54.910531390 +0000
coder@leetcode:/home/wibu/leetcode/leetcode$
coder@leetcode:/home/wibu/leetcode/leetcode$ id
uid=1001(coder) gid=1001(coder) groups=1001(coder),27(sudo)
coder@leetcode:/home/wibu/leetcode/leetcode$ ls /home
coder ubuntu wibu
coder@leetcode:/home/wibu/leetcode/leetcode$ stat /home/wibu
File: /home/wibu
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 8,1 Inode: 57813071 Links: 5
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-09-18 17:39:33.516648920 +0000
Modify: 2024-09-18 17:38:44.015072021 +0000
Change: 2024-09-18 17:38:44.015072021 +0000
Birth: 2024-09-15 19:33:54.910531390 +0000
coder@leetcode:/home/wibu/leetcode/leetcode$
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
note: /media/ser3_decoyer/TOSHIBA/ is a root owned /home/ser3_decoyer/repo/ is owned by ser3_decoyer
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
you meant the main.tf right ?
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
ye happened in coder
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
oh nah all good, i dont mind the wait, I can just mount one of dir root owned for now
55 replies
CCoder.com
Created by ÙwÚ on 8/22/2024 in #help
Permission in Vscode - Docker template
@Phorcys what should I provide here? I think the content is pretty much similar to what I posted above
55 replies