@theia/dev-container 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +43 -0
  2. package/lib/dev-container-server/dev-container-server.d.ts +2 -0
  3. package/lib/dev-container-server/dev-container-server.d.ts.map +1 -0
  4. package/lib/dev-container-server/dev-container-server.js +48 -0
  5. package/lib/dev-container-server/dev-container-server.js.map +1 -0
  6. package/lib/electron-browser/container-connection-contribution.d.ts +22 -0
  7. package/lib/electron-browser/container-connection-contribution.d.ts.map +1 -0
  8. package/lib/electron-browser/container-connection-contribution.js +106 -0
  9. package/lib/electron-browser/container-connection-contribution.js.map +1 -0
  10. package/lib/electron-browser/container-output-provider.d.ts +8 -0
  11. package/lib/electron-browser/container-output-provider.d.ts.map +1 -0
  12. package/lib/electron-browser/container-output-provider.js +41 -0
  13. package/lib/electron-browser/container-output-provider.js.map +1 -0
  14. package/lib/electron-browser/dev-container-frontend-module.d.ts +4 -0
  15. package/lib/electron-browser/dev-container-frontend-module.d.ts.map +1 -0
  16. package/lib/electron-browser/dev-container-frontend-module.js +33 -0
  17. package/lib/electron-browser/dev-container-frontend-module.js.map +1 -0
  18. package/lib/electron-common/container-output-provider.d.ts +4 -0
  19. package/lib/electron-common/container-output-provider.d.ts.map +1 -0
  20. package/lib/electron-common/container-output-provider.js +18 -0
  21. package/lib/electron-common/container-output-provider.js.map +1 -0
  22. package/lib/electron-common/remote-container-connection-provider.d.ts +27 -0
  23. package/lib/electron-common/remote-container-connection-provider.d.ts.map +1 -0
  24. package/lib/electron-common/remote-container-connection-provider.js +21 -0
  25. package/lib/electron-common/remote-container-connection-provider.js.map +1 -0
  26. package/lib/electron-node/dev-container-backend-module.d.ts +5 -0
  27. package/lib/electron-node/dev-container-backend-module.d.ts.map +1 -0
  28. package/lib/electron-node/dev-container-backend-module.js +44 -0
  29. package/lib/electron-node/dev-container-backend-module.js.map +1 -0
  30. package/lib/electron-node/dev-container-file-service.d.ts +10 -0
  31. package/lib/electron-node/dev-container-file-service.d.ts.map +1 -0
  32. package/lib/electron-node/dev-container-file-service.js +73 -0
  33. package/lib/electron-node/dev-container-file-service.js.map +1 -0
  34. package/lib/electron-node/devcontainer-contributions/main-container-creation-contributions.d.ts +29 -0
  35. package/lib/electron-node/devcontainer-contributions/main-container-creation-contributions.d.ts.map +1 -0
  36. package/lib/electron-node/devcontainer-contributions/main-container-creation-contributions.js +133 -0
  37. package/lib/electron-node/devcontainer-contributions/main-container-creation-contributions.js.map +1 -0
  38. package/lib/electron-node/devcontainer-file.d.ts +323 -0
  39. package/lib/electron-node/devcontainer-file.d.ts.map +1 -0
  40. package/lib/electron-node/devcontainer-file.js +18 -0
  41. package/lib/electron-node/devcontainer-file.js.map +1 -0
  42. package/lib/electron-node/docker-container-service.d.ts +23 -0
  43. package/lib/electron-node/docker-container-service.d.ts.map +1 -0
  44. package/lib/electron-node/docker-container-service.js +114 -0
  45. package/lib/electron-node/docker-container-service.js.map +1 -0
  46. package/lib/electron-node/remote-container-connection-provider.d.ts +74 -0
  47. package/lib/electron-node/remote-container-connection-provider.d.ts.map +1 -0
  48. package/lib/electron-node/remote-container-connection-provider.js +241 -0
  49. package/lib/electron-node/remote-container-connection-provider.js.map +1 -0
  50. package/lib/package.spec.d.ts +1 -0
  51. package/lib/package.spec.d.ts.map +1 -0
  52. package/lib/package.spec.js +26 -0
  53. package/lib/package.spec.js.map +1 -0
  54. package/package.json +55 -0
  55. package/src/dev-container-server/dev-container-server.ts +53 -0
  56. package/src/electron-browser/container-connection-contribution.ts +103 -0
  57. package/src/electron-browser/container-output-provider.ts +36 -0
  58. package/src/electron-browser/dev-container-frontend-module.ts +33 -0
  59. package/src/electron-common/container-output-provider.ts +19 -0
  60. package/src/electron-common/remote-container-connection-provider.ts +49 -0
  61. package/src/electron-node/dev-container-backend-module.ts +47 -0
  62. package/src/electron-node/dev-container-file-service.ts +72 -0
  63. package/src/electron-node/devcontainer-contributions/main-container-creation-contributions.ts +140 -0
  64. package/src/electron-node/devcontainer-file.ts +380 -0
  65. package/src/electron-node/docker-container-service.ts +124 -0
  66. package/src/electron-node/remote-container-connection-provider.ts +294 -0
  67. package/src/package.spec.ts +28 -0
@@ -0,0 +1,29 @@
1
+ import * as Docker from 'dockerode';
2
+ import { interfaces } from '@theia/core/shared/inversify';
3
+ import { ContainerCreationContribution } from '../docker-container-service';
4
+ import { DevContainerConfiguration, DockerfileContainer, ImageContainer } from '../devcontainer-file';
5
+ import { ContainerOutputProvider } from '../../electron-common/container-output-provider';
6
+ export declare function registerContainerCreationContributions(bind: interfaces.Bind): void;
7
+ export declare class ImageFileContribution implements ContainerCreationContribution {
8
+ handleContainerCreation(createOptions: Docker.ContainerCreateOptions, containerConfig: ImageContainer, api: Docker, outputprovider: ContainerOutputProvider): Promise<void>;
9
+ }
10
+ export declare class DockerFileContribution implements ContainerCreationContribution {
11
+ handleContainerCreation(createOptions: Docker.ContainerCreateOptions, containerConfig: DockerfileContainer, api: Docker, outputprovider: ContainerOutputProvider): Promise<void>;
12
+ }
13
+ export declare class ForwardPortsContribution implements ContainerCreationContribution {
14
+ handleContainerCreation(createOptions: Docker.ContainerCreateOptions, containerConfig: DevContainerConfiguration, api: Docker): Promise<void>;
15
+ }
16
+ export declare class MountsContribution implements ContainerCreationContribution {
17
+ handleContainerCreation(createOptions: Docker.ContainerCreateOptions, containerConfig: DevContainerConfiguration, api: Docker): Promise<void>;
18
+ parseMountString(mount: string): Docker.MountSettings;
19
+ }
20
+ export declare namespace OutputHelper {
21
+ interface Progress {
22
+ id?: string;
23
+ stream: string;
24
+ status?: string;
25
+ progress?: string;
26
+ }
27
+ function parseProgress(progress: Progress): string;
28
+ }
29
+ //# sourceMappingURL=main-container-creation-contributions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-container-creation-contributions.d.ts","sourceRoot":"","sources":["../../../src/electron-node/devcontainer-contributions/main-container-creation-contributions.ts"],"names":[],"mappings":"AAeA,OA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AAC,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACrB;IAED,SAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAExD;CACJ"}
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OutputHelper = exports.MountsContribution = exports.ForwardPortsContribution = exports.DockerFileContribution = exports.ImageFileContribution = exports.registerContainerCreationContributions = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const inversify_1 = require("@theia/core/shared/inversify");
6
+ const docker_container_service_1 = require("../docker-container-service");
7
+ const core_1 = require("@theia/core");
8
+ function registerContainerCreationContributions(bind) {
9
+ bind(docker_container_service_1.ContainerCreationContribution).to(ImageFileContribution).inSingletonScope();
10
+ bind(docker_container_service_1.ContainerCreationContribution).to(DockerFileContribution).inSingletonScope();
11
+ bind(docker_container_service_1.ContainerCreationContribution).to(ForwardPortsContribution).inSingletonScope();
12
+ bind(docker_container_service_1.ContainerCreationContribution).to(MountsContribution).inSingletonScope();
13
+ }
14
+ exports.registerContainerCreationContributions = registerContainerCreationContributions;
15
+ let ImageFileContribution = class ImageFileContribution {
16
+ async handleContainerCreation(createOptions, containerConfig, api, outputprovider) {
17
+ if (containerConfig.image) {
18
+ await new Promise((res, rej) => api.pull(containerConfig.image, {}, (err, stream) => {
19
+ if (err) {
20
+ rej(err);
21
+ }
22
+ else {
23
+ api.modem.followProgress(stream, (error, output) => error ?
24
+ rej(error) :
25
+ res(), progress => outputprovider.onRemoteOutput(OutputHelper.parseProgress(progress)));
26
+ }
27
+ }));
28
+ createOptions.Image = containerConfig.image;
29
+ }
30
+ }
31
+ };
32
+ ImageFileContribution = (0, tslib_1.__decorate)([
33
+ (0, inversify_1.injectable)()
34
+ ], ImageFileContribution);
35
+ exports.ImageFileContribution = ImageFileContribution;
36
+ let DockerFileContribution = class DockerFileContribution {
37
+ async handleContainerCreation(createOptions, containerConfig, api, outputprovider) {
38
+ var _a, _b, _c, _d, _e;
39
+ // check if dockerfile container
40
+ if (containerConfig.dockerFile || ((_a = containerConfig.build) === null || _a === void 0 ? void 0 : _a.dockerfile)) {
41
+ const dockerfile = ((_b = containerConfig.dockerFile) !== null && _b !== void 0 ? _b : (_c = containerConfig.build) === null || _c === void 0 ? void 0 : _c.dockerfile);
42
+ const buildStream = await api.buildImage({
43
+ context: (_d = containerConfig.context) !== null && _d !== void 0 ? _d : new core_1.Path(containerConfig.location).dir.fsPath(),
44
+ src: [dockerfile],
45
+ }, {
46
+ buildargs: (_e = containerConfig.build) === null || _e === void 0 ? void 0 : _e.args
47
+ });
48
+ // TODO probably have some console windows showing the output of the build
49
+ const imageId = await new Promise((res, rej) => api.modem.followProgress(buildStream, (err, outputs) => {
50
+ var _a;
51
+ if (err) {
52
+ rej(err);
53
+ }
54
+ else {
55
+ for (let i = outputs.length - 1; i >= 0; i--) {
56
+ if ((_a = outputs[i].aux) === null || _a === void 0 ? void 0 : _a.ID) {
57
+ res(outputs[i].aux.ID);
58
+ return;
59
+ }
60
+ }
61
+ }
62
+ }, progress => outputprovider.onRemoteOutput(OutputHelper.parseProgress(progress))));
63
+ createOptions.Image = imageId;
64
+ }
65
+ }
66
+ };
67
+ DockerFileContribution = (0, tslib_1.__decorate)([
68
+ (0, inversify_1.injectable)()
69
+ ], DockerFileContribution);
70
+ exports.DockerFileContribution = DockerFileContribution;
71
+ let ForwardPortsContribution = class ForwardPortsContribution {
72
+ async handleContainerCreation(createOptions, containerConfig, api) {
73
+ var _a;
74
+ if (!containerConfig.forwardPorts) {
75
+ return;
76
+ }
77
+ for (const port of containerConfig.forwardPorts) {
78
+ let portKey;
79
+ let hostPort;
80
+ if (typeof port === 'string') {
81
+ const parts = port.split(':');
82
+ portKey = isNaN(+parts[0]) ? parts[0] : `${parts[0]}/tcp`;
83
+ hostPort = (_a = parts[1]) !== null && _a !== void 0 ? _a : parts[0];
84
+ }
85
+ else {
86
+ portKey = `${port}/tcp`;
87
+ hostPort = port.toString();
88
+ }
89
+ createOptions.ExposedPorts[portKey] = {};
90
+ createOptions.HostConfig.PortBindings[portKey] = [{ HostPort: hostPort }];
91
+ }
92
+ }
93
+ };
94
+ ForwardPortsContribution = (0, tslib_1.__decorate)([
95
+ (0, inversify_1.injectable)()
96
+ ], ForwardPortsContribution);
97
+ exports.ForwardPortsContribution = ForwardPortsContribution;
98
+ let MountsContribution = class MountsContribution {
99
+ async handleContainerCreation(createOptions, containerConfig, api) {
100
+ var _a, _b, _c;
101
+ if (!containerConfig.mounts) {
102
+ return;
103
+ }
104
+ createOptions.HostConfig.Mounts.push(...(_c = (_b = (_a = containerConfig) === null || _a === void 0 ? void 0 : _a.mounts) === null || _b === void 0 ? void 0 : _b.map(mount => {
105
+ var _a;
106
+ return typeof mount === 'string' ?
107
+ this.parseMountString(mount) :
108
+ { Source: mount.source, Target: mount.target, Type: (_a = mount.type) !== null && _a !== void 0 ? _a : 'bind' };
109
+ })) !== null && _c !== void 0 ? _c : []);
110
+ }
111
+ parseMountString(mount) {
112
+ var _a, _b, _c, _d;
113
+ const parts = mount.split(',');
114
+ return {
115
+ Source: (_a = parts.find(part => part.startsWith('source=') || part.startsWith('src='))) === null || _a === void 0 ? void 0 : _a.split('=')[1],
116
+ Target: (_b = parts.find(part => part.startsWith('target=') || part.startsWith('dst='))) === null || _b === void 0 ? void 0 : _b.split('=')[1],
117
+ Type: ((_d = (_c = parts.find(part => part.startsWith('type='))) === null || _c === void 0 ? void 0 : _c.split('=')[1]) !== null && _d !== void 0 ? _d : 'bind')
118
+ };
119
+ }
120
+ };
121
+ MountsContribution = (0, tslib_1.__decorate)([
122
+ (0, inversify_1.injectable)()
123
+ ], MountsContribution);
124
+ exports.MountsContribution = MountsContribution;
125
+ var OutputHelper;
126
+ (function (OutputHelper) {
127
+ function parseProgress(progress) {
128
+ var _a, _b, _c;
129
+ return (_c = (_b = (_a = progress.stream) !== null && _a !== void 0 ? _a : progress.progress) !== null && _b !== void 0 ? _b : progress.status) !== null && _c !== void 0 ? _c : '';
130
+ }
131
+ OutputHelper.parseProgress = parseProgress;
132
+ })(OutputHelper = exports.OutputHelper || (exports.OutputHelper = {}));
133
+ //# sourceMappingURL=main-container-creation-contributions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main-container-creation-contributions.js","sourceRoot":"","sources":["../../../src/electron-node/devcontainer-contributions/main-container-creation-contributions.ts"],"names":[],"mappings":";;;;AAgBA,4DAAsE;AACtE,0EAA4E;AAE5E,sCAAmC;AAGnC,SAAgB,sCAAsC,CAAC,IAAqB;IACxE,IAAI,CAAC,wDAA6B,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACjF,IAAI,CAAC,wDAA6B,CAAC,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAClF,IAAI,CAAC,wDAA6B,CAAC,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACpF,IAAI,CAAC,wDAA6B,CAAC,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAClF,CAAC;AALD,wFAKC;AAGD,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;IAC9B,KAAK,CAAC,uBAAuB,CAAC,aAA4C,EAAE,eAA+B,EACvG,GAAW,EAAE,cAAuC;QACpD,IAAI,eAAe,CAAC,KAAK,EAAE;YACvB,MAAM,IAAI,OAAO,CAAO,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;gBACtF,IAAI,GAAG,EAAE;oBACL,GAAG,CAAC,GAAG,CAAC,CAAC;iBACZ;qBAAM;oBACH,GAAG,CAAC,KAAK,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QAC/B,OAAO;YACH,MAAM,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,0CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAE;YACjG,MAAM,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,0CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAE;YACjG,IAAI,EAAE,CAAC,MAAA,MAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,0CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,mCAAI,MAAM,CAAqB;SACpG,CAAC;IACN,CAAC;CACJ,CAAA;AApBY,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAoB9B;AApBY,gDAAkB;AAsB/B,IAAiB,YAAY,CAW5B;AAXD,WAAiB,YAAY;IAQzB,SAAgB,aAAa,CAAC,QAAkB;;QAC5C,OAAO,MAAA,MAAA,MAAA,QAAQ,CAAC,MAAM,mCAAI,QAAQ,CAAC,QAAQ,mCAAI,QAAQ,CAAC,MAAM,mCAAI,EAAE,CAAC;IACzE,CAAC;IAFe,0BAAa,gBAE5B,CAAA;AACL,CAAC,EAXgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAW5B"}
@@ -0,0 +1,323 @@
1
+ /**
2
+ * Defines a dev container
3
+ * type generated from https://containers.dev/implementors/json_schema/ and modified
4
+ */
5
+ export declare type DevContainerConfiguration = (((DockerfileContainer | ImageContainer) & (NonComposeContainerBase)) | ComposeContainer) & DevContainerCommon & {
6
+ location?: string;
7
+ };
8
+ export declare type DockerfileContainer = {
9
+ /**
10
+ * Docker build-related options.
11
+ */
12
+ build: {
13
+ /**
14
+ * The location of the Dockerfile that defines the contents of the container. The path is relative to the folder containing the `devcontainer.json` file.
15
+ */
16
+ dockerfile: string;
17
+ /**
18
+ * The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file.
19
+ */
20
+ context?: string;
21
+ } & BuildOptions;
22
+ [k: string]: unknown;
23
+ } | {
24
+ /**
25
+ * The location of the Dockerfile that defines the contents of the container. The path is relative to the folder containing the `devcontainer.json` file.
26
+ */
27
+ dockerFile: string;
28
+ /**
29
+ * The location of the context folder for building the Docker image. The path is relative to the folder containing the `devcontainer.json` file.
30
+ */
31
+ context?: string;
32
+ /**
33
+ * Docker build-related options.
34
+ */
35
+ build?: {
36
+ /**
37
+ * Target stage in a multi-stage build.
38
+ */
39
+ target?: string;
40
+ /**
41
+ * Build arguments.
42
+ */
43
+ args?: {
44
+ [k: string]: string;
45
+ };
46
+ /**
47
+ * The image to consider as a cache. Use an array to specify multiple images.
48
+ */
49
+ cacheFrom?: string | string[];
50
+ [k: string]: unknown;
51
+ };
52
+ [k: string]: unknown;
53
+ };
54
+ export interface BuildOptions {
55
+ /**
56
+ * Target stage in a multi-stage build.
57
+ */
58
+ target?: string;
59
+ /**
60
+ * Build arguments.
61
+ */
62
+ args?: {
63
+ [k: string]: string;
64
+ };
65
+ /**
66
+ * The image to consider as a cache. Use an array to specify multiple images.
67
+ */
68
+ cacheFrom?: string | string[];
69
+ [k: string]: unknown;
70
+ }
71
+ export interface ImageContainer {
72
+ /**
73
+ * The docker image that will be used to create the container.
74
+ */
75
+ image: string;
76
+ [k: string]: unknown;
77
+ }
78
+ export interface NonComposeContainerBase {
79
+ /**
80
+ * Application ports that are exposed by the container. This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to
81
+ * the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. '8000:8010'.
82
+ */
83
+ appPort?: number | string | (number | string)[];
84
+ /**
85
+ * Container environment variables.
86
+ */
87
+ containerEnv?: {
88
+ [k: string]: string;
89
+ };
90
+ /**
91
+ * The user the container will be started with. The default is the user on the Docker image.
92
+ */
93
+ containerUser?: string;
94
+ /**
95
+ * Mount points to set up when creating the container. See Docker's documentation for the --mount option for the supported syntax.
96
+ */
97
+ mounts?: (string | MountConfig)[];
98
+ /**
99
+ * The arguments required when starting in the container.
100
+ */
101
+ runArgs?: string[];
102
+ /**
103
+ * Action to take when the user disconnects from the container in their editor. The default is to stop the container.
104
+ */
105
+ shutdownAction?: 'none' | 'stopContainer';
106
+ /**
107
+ * Whether to overwrite the command specified in the image. The default is true.
108
+ */
109
+ overrideCommand?: boolean;
110
+ /**
111
+ * The path of the workspace folder inside the container.
112
+ */
113
+ workspaceFolder?: string;
114
+ /**
115
+ * The --mount parameter for docker run. The default is to mount the project folder at /workspaces/$project.
116
+ */
117
+ workspaceMount?: string;
118
+ [k: string]: unknown;
119
+ }
120
+ export interface ComposeContainer {
121
+ /**
122
+ * The name of the docker-compose file(s) used to start the services.
123
+ */
124
+ dockerComposeFile: string | string[];
125
+ /**
126
+ * The service you want to work on. This is considered the primary container for your dev environment which your editor will connect to.
127
+ */
128
+ service: string;
129
+ /**
130
+ * An array of services that should be started and stopped.
131
+ */
132
+ runServices?: string[];
133
+ /**
134
+ * The path of the workspace folder inside the container. This is typically the target path of a volume mount in the docker-compose.yml.
135
+ */
136
+ workspaceFolder: string;
137
+ /**
138
+ * Action to take when the user disconnects from the primary container in their editor. The default is to stop all of the compose containers.
139
+ */
140
+ shutdownAction?: 'none' | 'stopCompose';
141
+ /**
142
+ * Whether to overwrite the command specified in the image. The default is false.
143
+ */
144
+ overrideCommand?: boolean;
145
+ [k: string]: unknown;
146
+ }
147
+ export interface DevContainerCommon {
148
+ /**
149
+ * A name for the dev container which can be displayed to the user.
150
+ */
151
+ name?: string;
152
+ /**
153
+ * Features to add to the dev container.
154
+ */
155
+ features?: {
156
+ [k: string]: unknown;
157
+ };
158
+ /**
159
+ * Array consisting of the Feature id (without the semantic version) of Features in the order the user wants them to be installed.
160
+ */
161
+ overrideFeatureInstallOrder?: string[];
162
+ /**
163
+ * Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format 'host:port_number'.
164
+ */
165
+ forwardPorts?: (number | string)[];
166
+ portsAttributes?: {
167
+ /**
168
+ * A port, range of ports (ex. '40000-55000'), or regular expression (ex. '.+\\/server.js').
169
+ * For a port number or range, the attributes will apply to that port number or range of port numbers.
170
+ * Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.
171
+ *
172
+ * This interface was referenced by `undefined`'s JSON-Schema definition
173
+ * via the `patternProperty` '(^\d+(-\d+)?$)|(.+)'.
174
+ */
175
+ [k: string]: {
176
+ /**
177
+ * Defines the action that occurs when the port is discovered for automatic forwarding
178
+ */
179
+ onAutoForward?: 'notify' | 'openBrowser' | 'openBrowserOnce' | 'openPreview' | 'silent' | 'ignore';
180
+ /**
181
+ * Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.
182
+ */
183
+ elevateIfNeeded?: boolean;
184
+ /**
185
+ * Label that will be shown in the UI for this port.
186
+ */
187
+ label?: string;
188
+ requireLocalPort?: boolean;
189
+ /**
190
+ * The protocol to use when forwarding this port.
191
+ */
192
+ protocol?: 'http' | 'https';
193
+ [k: string]: unknown;
194
+ };
195
+ };
196
+ otherPortsAttributes?: {
197
+ /**
198
+ * Defines the action that occurs when the port is discovered for automatic forwarding
199
+ */
200
+ onAutoForward?: 'notify' | 'openBrowser' | 'openPreview' | 'silent' | 'ignore';
201
+ /**
202
+ * Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.
203
+ */
204
+ elevateIfNeeded?: boolean;
205
+ /**
206
+ * Label that will be shown in the UI for this port.
207
+ */
208
+ label?: string;
209
+ requireLocalPort?: boolean;
210
+ /**
211
+ * The protocol to use when forwarding this port.
212
+ */
213
+ protocol?: 'http' | 'https';
214
+ };
215
+ /**
216
+ * Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default when opening from a local folder.
217
+ */
218
+ updateRemoteUserUID?: boolean;
219
+ /**
220
+ * Remote environment variables to set for processes spawned in the container including lifecycle scripts and any remote editor/IDE server process.
221
+ */
222
+ remoteEnv?: {
223
+ [k: string]: string | null;
224
+ };
225
+ /**
226
+ * The username to use for spawning processes in the container including lifecycle scripts and any remote editor/IDE server process.
227
+ * The default is the same user as the container.
228
+ */
229
+ remoteUser?: string;
230
+ /**
231
+ * A command to run locally before anything else. This command is run before 'onCreateCommand'.
232
+ * If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.
233
+ */
234
+ initializeCommand?: string | string[];
235
+ /**
236
+ * A command to run when creating the container. This command is run after 'initializeCommand' and before 'updateContentCommand'.
237
+ * If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.
238
+ */
239
+ onCreateCommand?: string | string[] | {
240
+ [k: string]: string | string[];
241
+ };
242
+ /**
243
+ * A command to run when creating the container and rerun when the workspace content was updated while creating the container.
244
+ * This command is run after 'onCreateCommand' and before 'postCreateCommand'. If this is a single string, it will be run in a shell.
245
+ * If this is an array of strings, it will be run as a single command without shell.
246
+ */
247
+ updateContentCommand?: string | string[] | {
248
+ [k: string]: string | string[];
249
+ };
250
+ /**
251
+ * A command to run after creating the container. This command is run after 'updateContentCommand' and before 'postStartCommand'.
252
+ * If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.
253
+ */
254
+ postCreateCommand?: string | string[] | {
255
+ [k: string]: string | string[];
256
+ };
257
+ /**
258
+ * A command to run after starting the container. This command is run after 'postCreateCommand' and before 'postAttachCommand'.
259
+ * If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.
260
+ */
261
+ postStartCommand?: string | string[] | {
262
+ [k: string]: string | string[];
263
+ };
264
+ /**
265
+ * A command to run when attaching to the container. This command is run after 'postStartCommand'. If this is a single string, it will be run in a shell.
266
+ * If this is an array of strings, it will be run as a single command without shell.
267
+ */
268
+ postAttachCommand?: string | string[] | {
269
+ [k: string]: string | string[];
270
+ };
271
+ /**
272
+ * The user command to wait for before continuing execution in the background while the UI is starting up. The default is 'updateContentCommand'.
273
+ */
274
+ waitFor?: 'initializeCommand' | 'onCreateCommand' | 'updateContentCommand' | 'postCreateCommand' | 'postStartCommand';
275
+ /**
276
+ * User environment probe to run. The default is 'loginInteractiveShell'.
277
+ */
278
+ userEnvProbe?: 'none' | 'loginShell' | 'loginInteractiveShell' | 'interactiveShell';
279
+ /**
280
+ * Host hardware requirements.
281
+ */
282
+ hostRequirements?: {
283
+ /**
284
+ * Number of required CPUs.
285
+ */
286
+ cpus?: number;
287
+ /**
288
+ * Amount of required RAM in bytes. Supports units tb, gb, mb and kb.
289
+ */
290
+ memory?: string;
291
+ /**
292
+ * Amount of required disk space in bytes. Supports units tb, gb, mb and kb.
293
+ */
294
+ storage?: string;
295
+ gpu?: (true | false | 'optional') | {
296
+ /**
297
+ * Number of required cores.
298
+ */
299
+ cores?: number;
300
+ /**
301
+ * Amount of required RAM in bytes. Supports units tb, gb, mb and kb.
302
+ */
303
+ memory?: string;
304
+ };
305
+ [k: string]: unknown;
306
+ };
307
+ /**
308
+ * Tool-specific configuration. Each tool should use a JSON object subproperty with a unique name to group its customizations.
309
+ */
310
+ customizations?: {
311
+ [k: string]: unknown;
312
+ };
313
+ additionalProperties?: {
314
+ [k: string]: unknown;
315
+ };
316
+ [k: string]: unknown;
317
+ }
318
+ export interface MountConfig {
319
+ source: string;
320
+ target: string;
321
+ type: 'volume' | 'bind';
322
+ }
323
+ //# sourceMappingURL=devcontainer-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devcontainer-file.d.ts","sourceRoot":"","sources":["../../src/electron-node/devcontainer-file.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,oBAAY,yBAAyB,GAAG,CAAC,CAAC,CAAC,mBAAmB,GAAG,cAAc,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,GA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IACH,cAAc,CAAC,EAAE;QACb,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,CAAA;IACD,oBAAoB,CAAC,EAAE;QACnB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,CAAA;IACD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2024 Typefox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=devcontainer-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devcontainer-file.js","sourceRoot":"","sources":["../../src/electron-node/devcontainer-file.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF"}
@@ -0,0 +1,23 @@
1
+ import { ContributionProvider, URI } from '@theia/core';
2
+ import { WorkspaceServer } from '@theia/workspace/lib/common';
3
+ import * as Docker from 'dockerode';
4
+ import { LastContainerInfo } from '../electron-common/remote-container-connection-provider';
5
+ import { DevContainerConfiguration } from './devcontainer-file';
6
+ import { DevContainerFileService } from './dev-container-file-service';
7
+ import { ContainerOutputProvider } from '../electron-common/container-output-provider';
8
+ export declare const ContainerCreationContribution: unique symbol;
9
+ export interface ContainerCreationContribution {
10
+ handleContainerCreation(createOptions: Docker.ContainerCreateOptions, containerConfig: DevContainerConfiguration, api: Docker, outputProvider?: ContainerOutputProvider): Promise<void>;
11
+ }
12
+ export declare class DockerContainerService {
13
+ protected readonly workspaceServer: WorkspaceServer;
14
+ protected readonly containerCreationContributions: ContributionProvider<ContainerCreationContribution>;
15
+ protected readonly devContainerFileService: DevContainerFileService;
16
+ getOrCreateContainer(docker: Docker, devcontainerFile: string, lastContainerInfo?: LastContainerInfo, outputProvider?: ContainerOutputProvider): Promise<Docker.Container>;
17
+ protected buildContainer(docker: Docker, devcontainerFile: string, workspace: URI, outputProvider?: ContainerOutputProvider): Promise<Docker.Container>;
18
+ protected getPortBindings(forwardPorts: (string | number)[]): {
19
+ exposedPorts: {};
20
+ portBindings: {};
21
+ };
22
+ }
23
+ //# sourceMappingURL=docker-container-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docker-container-service.d.ts","sourceRoot":"","sources":["../../src/electron-node/docker-container-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,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