Sign inSign up

jforge/docker-node-npx-typescript

By jforge

•Updated almost 7 years ago

Image
0

1.0K

jforge/docker-node-npx-typescript repository overview

⁠docker-node-npx-typescript

A docker image with node, npx and typescript support

⁠Usage

docker run --rm -v $(pwd):/app jforge/docker-node-npx-typescript -c "ts-node app/<local-typescript-file-path>.ts"

⁠Example

In a AWS CDK⁠ context you may need to use the cdk cli command.

This requires some cdk.json descriptor and respective tools, in this case npx⁠ and ts-node⁠ for typescript execution:

{
  "app": "npx ts-node bin/lambda-edge-multi-stack.ts"
}

With a container spawned using this image you may create a npx wrapper npxd containing

#!/usr/bin/env bash
docker run --rm -v $(pwd):/app jforge/docker-node-npx-typescript -c "ts-node app/$@"

and change the above cdk.jsonto:

{
  "app": "./npxd bin/lambda-edge-multi-stack.ts"
}

A call to cdk list should list the declared cdk stacks, cdk synth should acknowledge a successful cloudformation synthesis.

Tag summary

Content type

Image

Digest

Size

371.5 MB

Last updated

almost 7 years ago

docker pull jforge/docker-node-npx-typescript