added devcontainer
This commit is contained in:
22
.devcontainer/Dockerfile
Normal file
22
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Use Ubuntu as the base image
|
||||||
|
FROM ubuntu:latest
|
||||||
|
|
||||||
|
# Update and install necessary dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
vim \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Set the working directory to /workspace (VSCode will mount your local folder here)
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
# Set the default user as root for installing packages
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# Expose any necessary ports (if needed)
|
||||||
|
# EXPOSE 3000
|
||||||
|
|
||||||
|
# Run bash as the default command when the container starts
|
||||||
|
CMD ["/bin/bash"]
|
||||||
8
.devcontainer/devcontainer.json
Normal file
8
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"name": "Ubuntu DevContainer",
|
||||||
|
"dockerFile": "Dockerfile", // Reference to your Dockerfile
|
||||||
|
"context": ".", // The context is the root of your project
|
||||||
|
"workspaceFolder": "/workspace", // Where VSCode will mount your current folder inside the container
|
||||||
|
"mounts": ["source=${localWorkspaceFolder},target=/workspace,type=bind"],
|
||||||
|
"postCreateCommand": "echo 'Devcontainer setup complete!'"
|
||||||
|
}
|
||||||
22
.devcontainer/docker-compose.yaml
Normal file
22
.devcontainer/docker-compose.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: 42chips
|
||||||
|
|
||||||
|
# Services
|
||||||
|
services:
|
||||||
|
42chips:
|
||||||
|
container_name: 42chips
|
||||||
|
user: vscode
|
||||||
|
build:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
context: .
|
||||||
|
volumes:
|
||||||
|
- ..:/workspace
|
||||||
|
- 42chips-home:/home
|
||||||
|
networks:
|
||||||
|
- 42chips-net
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
42chips-home:
|
||||||
|
name: 42chips-home
|
||||||
|
networks:
|
||||||
|
42chips-net:
|
||||||
|
name: 42chips-net
|
||||||
Reference in New Issue
Block a user