Skip to content

Commit

Permalink
Include config (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Nov 28, 2022
1 parent 1de0059 commit 4aa0e55
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/spec-node/containerFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function extendImage(params: DockerResolverParameters, config: Subs
// no feature extensions - return
return {
updatedImageName: [imageName],
imageMetadata: imageBuildInfo.metadata,
imageMetadata: getDevcontainerMetadata(imageBuildInfo.metadata, config, extendImageDetails?.featuresConfig),
imageDetails: async () => imageBuildInfo.imageDetails,
labels: extendImageDetails?.labels,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"postCreateCommand": "touch /postCreateCommand.txt",
"remoteEnv": {
"TEST": "ENV"
}
Expand Down
1 change: 1 addition & 0 deletions src/test/configs/image/.devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"image": "ubuntu:latest",
"postCreateCommand": "touch /postCreateCommand.txt",
"remoteEnv": {
"LOCAL_PATH": "${localEnv:PATH}",
"CONTAINER_PATH": "${containerEnv:PATH}"
Expand Down
1 change: 1 addition & 0 deletions src/test/imageMetadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ describe('Image Metadata', function () {
const metadata = internalGetImageMetadata0(details, true, nullLog);
assert.strictEqual(metadata.length, 1);
assert.ok(metadata[0].remoteEnv);
await shellExec(`docker exec ${response.containerId} test -f /postCreateCommand.txt`);
await shellExec(`docker rm -f ${response.containerId}`);
});
});
Expand Down

0 comments on commit 4aa0e55

Please sign in to comment.