Compare commits
2 Commits
borys
...
mpabi-p25.
Author | SHA1 | Date |
---|---|---|
mpabi | f486ad61fc | |
filih | cf225129a5 |
19
Dockerfile
19
Dockerfile
|
@ -33,7 +33,24 @@ RUN useradd -m -s /bin/bash user && \
|
|||
usermod -aG sudo user
|
||||
|
||||
# Opcjonalnie: Ustawienie domyślnego użytkownika
|
||||
# USER user
|
||||
USER user
|
||||
|
||||
# Install Vim-Plug for Vim plugin management
|
||||
RUN curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
|
||||
|
||||
# Copy the project into the image
|
||||
#COPY --chown=user:user . /home/user/fapi
|
||||
#COPY --chown=user:user ./_confs/* ./
|
||||
COPY ./_confs/* ./
|
||||
|
||||
# Install Vim plugins via Vim-Plug
|
||||
RUN vim +'PlugInstall --sync' +qall
|
||||
|
||||
|
||||
# Set the working directory for installing dependencies
|
||||
WORKDIR /home/user/work
|
||||
|
||||
# Ustawienie domyślnego polecenia
|
||||
CMD ["/bin/bash"]
|
||||
|
|
4
__vp
4
__vp
|
@ -1,7 +1,7 @@
|
|||
f() {
|
||||
sudo docker run --rm -dit --privileged \
|
||||
-v "$(pwd)/app:/home/user/work" \
|
||||
-p 3333:3333 \
|
||||
-v "$(pwd)/../app:/home/user/work" \
|
||||
-p 4321:4321\
|
||||
--name "$1" deb su - user;
|
||||
};
|
||||
f $1
|
||||
|
|
1
app
1
app
|
@ -1 +0,0 @@
|
|||
Subproject commit db0752d3e05f90f7fd8dda802b2366f3c6942b87
|
|
@ -0,0 +1 @@
|
|||
git submodule add -b z1 http://t:f6ad1fe79d0b929d8def3339dafcbf919f311acf@qstack.pl:3000/c2023/p22.10 app
|
|
@ -0,0 +1 @@
|
|||
f() { sudo docker run --rm -dit --privileged --name "$1" deb su - user; }; f deb1
|
|
@ -0,0 +1,6 @@
|
|||
f() {
|
||||
sudo docker run --rm -dit --privileged \
|
||||
-v "$(pwd)/app:/home/user/work" \
|
||||
--name "$1" deb su - user;
|
||||
};
|
||||
f $1
|
|
@ -0,0 +1,7 @@
|
|||
f() {
|
||||
sudo docker run --rm -dit --privileged \
|
||||
-v "$(pwd)/app:/home/user/work" \
|
||||
-p 3333:3333 \
|
||||
--name "$1" deb su - user;
|
||||
};
|
||||
f $1
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <container id or name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "expose container $1 netns"
|
||||
NETNS=`sudo docker inspect -f '{{.State.Pid}}' $1`
|
||||
|
||||
if [ ! -d /var/run/netns ]; then
|
||||
sudo mkdir /var/run/netns
|
||||
fi
|
||||
if [ -f /var/run/netns/$NETNS ]; then
|
||||
sudo rm -rf /var/run/netns/$NETNS
|
||||
fi
|
||||
|
||||
sudo ln -s /proc/$NETNS/ns/net /var/run/netns/$NETNS
|
||||
echo "done. netns: $NETNS"
|
||||
|
||||
echo "============================="
|
||||
echo "current network namespaces: "
|
||||
echo "============================="
|
||||
ip netns
|
Loading…
Reference in New Issue