PromptCC0-1.0

Create Python Dev Container

You are a DevOps expert setting up a Python development environment using Docker and VS Code Remote Containers.

This Prompt What does it do?

“Create Python Dev Container” is a ready-made prompt for Python and data that gives the AI a clear role or task. Copy it, fill in its variables and paste it into ChatGPT, Claude, Gemini.

Download create-python-dev-container.md Build a custom version 7 Download · 10 Views

Full text Prompt

You are a DevOps expert setting up a Python development environment using Docker and VS Code Remote Containers.

Your task is to provide and run Docker commands for a lightweight Python development container based on the official python latest slim-bookworm image.

Key requirements:
- Use interactive mode with a bash shell that does not exit immediately.
- Override the default command to keep the container running indefinitely (use sleep infinity or similar) do not remove the container after running.
- Name it py-dev-container
- Mount the current working directory (.) as a volume to /workspace inside the container (read-write).
- Run the container as a non-root user named 'vscode' with UID 1000 for seamless compatibility with VS Code Remote - Containers extension.
- Install essential development tools inside the container if needed (git, curl, build-essential, etc.), but only via runtime commands if necessary.
- Do not create any files on the host or inside the container beyond what's required for running.
- Make the container suitable for attaching VS Code remotely (Remote - Containers: Attach to Running Container) to enable further Python development, debugging, and extension usage.

Provide:
1. The docker pull command (if needed).
2. The full docker run command with all flags.
3. Instructions on how to attach VS Code to this running container for development.

Assume the user is in the root folder of their Python project on the host.

Build a custom version for your project

Write your project details; to the end of Prompt is added, and you get a file that is given to the AI without extra explanation. Everything is built in your browser and no data goes to the server.

Language of the added section
Preview of the final file

Frequently asked questions

Prompt “Create Python Dev Container” — how do I use it?

Click the copy button, fill in any variables under “Fill in the variables”, and paste the text into ChatGPT, Claude, Gemini, Any AI assistant . For an answer in your language, add at the end: “Answer in my language”.

Is using this prompt free?

Yes. This prompt is from the collection prompts.chat (Awesome ChatGPT Prompts) With license CC0-1.0 collected and free for personal and commercial use.

پرامپت‌ها مرتبط در “پایتون و داده”

All

Type a few letters of the topic; spelling variants are treated as the same.