Package io.github.cdklabs.projen.vscode
Class DevContainer
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.vscode.DevContainer
-
- All Implemented Interfaces:
IDevEnvironment,IDevContainerEnvironment,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.319Z") @Stability(Experimental) public class DevContainer extends Component implements IDevContainerEnvironment
(experimental) A development environment running VSCode in a container;used by GitHub codespaces.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDevContainer.Builder(experimental) A fluent builder forDevContainer.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
-
Nested classes/interfaces inherited from interface io.github.cdklabs.projen.vscode.IDevContainerEnvironment
IDevContainerEnvironment.Jsii$Default, IDevContainerEnvironment.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description DevContainer(Project project)DevContainer(Project project, DevContainerOptions options)protectedDevContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedDevContainer(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDockerImage(DevEnvironmentDockerImage image)(experimental) Add a custom Docker image or Dockerfile for the container.voidaddFeatures(@NotNull DevContainerFeature... features)(experimental) Adds a list of VSCode features that should be automatically installed in the container.voidaddPorts(@NotNull String... ports)(experimental) Adds ports that should be exposed (forwarded) from the container.voidaddTasks(@NotNull Task... tasks)(experimental) Adds tasks to run when the container starts.voidaddVscodeExtensions(@NotNull String... extensions)(experimental) Adds a list of VSCode extensions that should be automatically installed in the container.ObjectgetConfig()(experimental) Direct access to the devcontainer configuration (escape hatch).-
Methods inherited from class io.github.cdklabs.projen.Component
getProject, isComponent, postSynthesize, preSynthesize, synthesize
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
DevContainer
protected DevContainer(software.amazon.jsii.JsiiObjectRef objRef)
-
DevContainer
protected DevContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
DevContainer
@Stability(Experimental) public DevContainer(@NotNull Project project, @Nullable DevContainerOptions options)- Parameters:
project- This parameter is required.options-
-
DevContainer
@Stability(Experimental) public DevContainer(@NotNull Project project)- Parameters:
project- This parameter is required.
-
-
Method Detail
-
addDockerImage
@Stability(Experimental) public void addDockerImage(@NotNull DevEnvironmentDockerImage image)(experimental) Add a custom Docker image or Dockerfile for the container.- Specified by:
addDockerImagein interfaceIDevEnvironment- Parameters:
image- This parameter is required.
-
addFeatures
@Stability(Experimental) public void addFeatures(@NotNull @NotNull DevContainerFeature... features)(experimental) Adds a list of VSCode features that should be automatically installed in the container.- Specified by:
addFeaturesin interfaceIDevContainerEnvironment- Parameters:
features- featureName and version(optional default: latest). This parameter is required.
-
addPorts
@Stability(Experimental) public void addPorts(@NotNull @NotNull String... ports)(experimental) Adds ports that should be exposed (forwarded) from the container.- Specified by:
addPortsin interfaceIDevEnvironment- Parameters:
ports- The new ports. This parameter is required.
-
addTasks
@Stability(Experimental) public void addTasks(@NotNull @NotNull Task... tasks)(experimental) Adds tasks to run when the container starts.Tasks will be run in sequence.
- Specified by:
addTasksin interfaceIDevEnvironment- Parameters:
tasks- The new tasks. This parameter is required.
-
addVscodeExtensions
@Stability(Experimental) public void addVscodeExtensions(@NotNull @NotNull String... extensions)(experimental) Adds a list of VSCode extensions that should be automatically installed in the container.- Specified by:
addVscodeExtensionsin interfaceIDevEnvironment- Parameters:
extensions- The extension IDs. This parameter is required.
-
getConfig
@Stability(Experimental) @NotNull public Object getConfig()
(experimental) Direct access to the devcontainer configuration (escape hatch).
-
-