mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 11:20:15 +01:00
refactor: Add Docker and Docker Compose installation to devcontainer setup
This commit is contained in:
parent
87bdbda10a
commit
104dc9a08e
3 changed files with 23 additions and 8 deletions
|
|
@ -1,5 +1,16 @@
|
|||
FROM node:18-bullseye
|
||||
|
||||
RUN useradd -m -s /bin/bash vscode
|
||||
RUN apt-get update && apt-get install -y sudo
|
||||
RUN useradd -m -s /bin/bash vscode && echo "vscode ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/vscode
|
||||
RUN mkdir -p /workspaces && chown -R vscode:vscode /workspaces
|
||||
WORKDIR /workspaces
|
||||
|
||||
# Install Docker and Docker Compose
|
||||
RUN apt-get update && \
|
||||
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release && \
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
|
||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
||||
apt-get update && \
|
||||
apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||
|
||||
USER vscode
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
{
|
||||
"name": "LibreChat Development",
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspaces",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [],
|
||||
"extensions": ["ms-azuretools.vscode-docker"],
|
||||
"settings": {
|
||||
"terminal.integrated.profiles.linux": {
|
||||
"bash": null
|
||||
}
|
||||
"terminal.integrated.defaultProfile.linux": "bash"
|
||||
}
|
||||
}
|
||||
},
|
||||
"postCreateCommand": "",
|
||||
"features": { "ghcr.io/devcontainers/features/git:1": {} },
|
||||
"remoteUser": "vscode"
|
||||
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y docker.io docker-compose",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/git:1": {},
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
||||
},
|
||||
"remoteUser": "vscode",
|
||||
"forwardPorts": [3080, 27017, 7700]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ services:
|
|||
volumes:
|
||||
# This is where VS Code should expect to find your project's source code and the value of "workspaceFolder" in .devcontainer/devcontainer.json
|
||||
- ..:/workspaces:cached
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker-compose for details.
|
||||
# - /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue