Skip to content

shinyay/hello-devcontainer-with-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Hello Dev Container with Python

Development containers (Dev Containers) are a VS Code feature that allows developers to package a local development tool stack into the internals of a Docker container while also bringing the VS Code UI experience with them.

image

Description

Dicrectory

The project consists of the following

.devcontainer/
├── compose.yaml
└── devcontainer.json

devcontainer.json

{
	"name": "devcontainr_python3",
	"dockerComposeFile": "./compose.yaml",
	"service": "python3",
	"workspaceFolder": "/workspace",
	"shutdownAction": "stopCompose",
	"customizations": {
		"vscode": {
		  "extensions": ["ms-python.python"]
		}
	}
}
item description
name Container name visible on VS Code
dockerComposeFile Specify by relative path the docker-comopse file used to create the container
service Specify the service name of the container you want to open in VScode among the services in docker-compose.yml
workspaceFolder Specify the root folder when the container is opened
shutdownAction Setting what to do with containers when a container screen is closed in VScode
stopCompose stops the container when the screen is closed
customizations/vscode/extensions Specify VScode extensions to be installed with container creation

Docker Compose file

version: "3"
services:
  python3:
    container_name: "python3_container"
    image: "python:3.12.1-slim-bullseye"
    tty: true
    volumes:
      - .:/workspace
item description
tty If true, an interactive shell session can be started in the container
volumes Set up with "HOST RELATIVE PATH:CONTAINER ABSOLUTE PATH" and bind the host and container volumes
``
``

Demo

Features

  • feature:1
  • feature:2

Requirement

Usage

Installation

References

Licence

Released under the MIT license

Author

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages