dockers are working with vscode

This commit is contained in:
2025-01-14 10:55:02 +01:00
parent 23c1456e7e
commit 8128f4c2f7
6 changed files with 26 additions and 14 deletions

View File

@@ -26,6 +26,6 @@ RUN /tmp/install_herolib.vsh && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/usr/local/bin/ourinit.sh"]
ENTRYPOINT ["/bin/bash"]
CMD ["/bin/bash"]

View File

@@ -23,7 +23,7 @@ trap cleanup EXIT
# Attempt to build the Docker image
BUILD_LOG=$(mktemp)
set +e
docker build --progress=plain -t "$DOCKER_IMAGE_NAME" .
docker build --name herolib --progress=plain -t "$DOCKER_IMAGE_NAME" .
BUILD_EXIT_CODE=$?
set -e
@@ -31,7 +31,7 @@ set -e
if [ $BUILD_EXIT_CODE -ne 0 ]; then
echo -e "\\n[ERROR] Docker build failed.\n"
echo -e "remove the part which didn't build in the Dockerfile, the run again and to debug do:"
echo docker run --name debug -it --entrypoint=/bin/bash "debug-image"
echo docker run --name herolib -it --entrypoint=/bin/bash "herolib"
exit $BUILD_EXIT_CODE
else
echo -e "\\n[INFO] Docker build completed successfully."

View File

@@ -8,14 +8,24 @@ cd "$SCRIPT_DIR"
docker rm -f herolib > /dev/null 2>&1
# Run the Docker container
# docker run --name herolib -it \
# --entrypoint="/bin/bash" \
# -v "${SCRIPT_DIR}/scripts:/scripts" \
# -v "$HOME/code:/root/code" \
# -p 4100:8100 \
# -p 4101:8101 \
# -p 4102:8102 \
# -p 4379:6379 \
# -p 4000:3000 \
# herolib -c "/usr/local/bin/ourinit.sh && /bin/bash"
docker run --name herolib -it \
--entrypoint="/bin/bash" \
--entrypoint="/usr/local/bin/ourinit.sh" \
-v "${SCRIPT_DIR}/scripts:/scripts" \
-v "$HOME/code:/root/code" \
-p 4100:8100 \
-p 4101:8101 \
-p 4102:8102 \
-p 4379:6379 \
-p 4000:3000 \
herolib
-p 4000:3000 herolib

View File

@@ -14,17 +14,19 @@ services:
build:
context: .
dockerfile: Dockerfile
image: herolib:latest
container_name: herolib
volumes:
- ~/code:/root/code
stdin_open: true
tty: true
ports:
- "8100:4100"
- "8101:4101"
- "8102:4102"
- "6379:4379"
- "3000:4000"
- "4100:8100"
- "4101:8101"
- "4102:8102"
- "4379:6379"
- "4000:3000"
command: ["/usr/local/bin/ourinit.sh"]
volumes:
postgres_data:

View File

@@ -76,7 +76,7 @@ else
fi
# Install default plugins
PLUGINS=("ms-python.python" "esbenp.prettier-vscode")
PLUGINS=("ms-python.python" "esbenp.prettier-vscode" "saoudrizwan.claude-dev" "yzhang.markdown-all-in-one" "ms-vscode-remote.remote-ssh" "ms-vscode.remote-explorer" "charliermarsh.ruff" "qwtel.sqlite-viewer" "vosca.vscode-v-analyzer" "tomoki1207.pdf")
for PLUGIN in "${PLUGINS[@]}"; do
"$INSTALL_DIR/bin/openvscode-server" --install-extension "$PLUGIN"
done

View File

@@ -8,4 +8,4 @@ if tmux has-session -t "$TMUX_SESSION" 2>/dev/null; then
fi
tmux new-session -d -s "$TMUX_SESSION" "/usr/local/bin/openvscode-server --host 0.0.0.0 --without-connection-token"
exec /bin/bash