Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 9ed847cb

Přidáno uživatelem Jakub Vašta před asi 4 roky(ů)

devcontainer removed from root

Zobrazit rozdíly:

.devcontainer/devcontainer.json
1
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
2
// https://github.com/microsoft/vscode-dev-containers/tree/v0.117.0/containers/docker-existing-docker-compose
3
// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
4
{
5
	"name": "Existing Docker Compose (Extend)",
6

  
7
	// Update the 'dockerComposeFile' list if you have more compose files or use different names.
8
	// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
9
	"dockerComposeFile": [
10
		"..\\docker-compose-dev.yml",
11
		"docker-compose.yml"
12
	],
13

  
14
	// The 'service' property is the name of the service for the container that VS Code should
15
	// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
16
	"service": "php-fpm",
17

  
18
	// The optional 'workspaceFolder' property is the path VS Code should open by default when
19
	// connected. This is typically a file mount in .devcontainer/docker-compose.yml
20
	"workspaceFolder": "/workspace",
21

  
22
	// Set *default* container specific settings.json values on container create.
23
	"settings": { 
24
		"terminal.integrated.shell.linux": null
25
	},
26

  
27
	// Add the IDs of extensions you want installed when the container is created.
28
	"extensions": []
29

  
30
	// Use 'forwardPorts' to make a list of ports inside the container available locally.
31
	// "forwardPorts": [],
32

  
33
	// Uncomment the next line if you want start specific services in your Docker Compose config.
34
	// "runServices": [],
35

  
36
	// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
37
	// "shutdownAction": "none",
38

  
39
	// Uncomment the next line to run commands after the container is created - for example installing git.
40
	// "postCreateCommand": "apt-get update && apt-get install -y git",
41

  
42
	// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
43
	// "remoteUser": "vscode"
44
}
.devcontainer/docker-compose.yml
1
#-------------------------------------------------------------------------------------------------------------
2
# Copyright (c) Microsoft Corporation. All rights reserved.
3
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4
#-------------------------------------------------------------------------------------------------------------
5

  
6
version: '3.2'
7
services:
8
  # Update this to the name of the service you want to work with in your docker-compose.yml file
9
  php-fpm:
10
    # If you want add a non-root user to your Dockerfile, you can use the "remoteUser"
11
    # property in devcontainer.json to cause VS Code its sub-processes (terminals, tasks, 
12
    # debugging) to execute as the user. Uncomment the next line if you want the entire 
13
    # container to run as this user instead. Note that, on Linux, you may need to 
14
    # ensure the UID and GID of the container user you create matches your local user. 
15
    # See https://aka.ms/vscode-remote/containers/non-root for details.
16
    #
17
    # user: vscode
18

  
19
    # Uncomment if you want to override the service's Dockerfile to one in the .devcontainer 
20
    # folder. Note that the path of the Dockerfile and context is relative to the *primary* 
21
    # docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile"
22
    # array). The sample below assumes your primary file is in the root of your project.
23
    #
24
    # build:
25
    #   context: .
26
    #   dockerfile: .devcontainer/Dockerfile
27
    
28
    volumes:
29
      # Update this to wherever you want VS Code to mount the folder of your project
30
      - .:/workspace:cached
31

  
32
      # Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-in-docker-compose for details.
33
      # - /var/run/docker.sock:/var/run/docker.sock 
34

  
35
    # Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
36
    # cap_add:
37
    #   - SYS_PTRACE
38
    # security_opt:
39
    #   - seccomp:unconfined
40

  
41
    # Overrides default command so things don't shut down after the process ends.
42
    command: /bin/sh -c "while sleep 1000; do :; done"
43
 

Také k dispozici: Unified diff