
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@codedazur/cdk-docker-cluster
Advanced tools
This construct creates a load balanced Fargate service, for which it builds a Docker image from a local directory. A CloudFront distribution is connected to the load balancer.
This construct creates a load balanced Fargate service, for which it builds a Docker image from a local directory. A CloudFront distribution is connected to the load balancer.
The minimum needed to get a DockerCluster up and running is a path to the source directory that contains a Dockerfile, relative to the CDK app, and the port on which your container needs to be accessible.
new DockerCluster(this, "DockerCluster", {
source: "../path/to/source",
service: {
port: 3000,
},
});
If your Dockerfile is not located directly in the build context directory, which is common for monorepositories, you can provide the path to the Dockerfile relative to the source directory.
new DockerCluster({
source: {
directory: "../path/to/source",
file: "./apps/myApp/DockerFile",
},
// ...
});
Additionally, if your Dockerfile requires arguments and/or secrets, you can provide those as well.
new DockerCluster({
source: {
// ...
arguments: {
MY_BUILD_ARGUMENT: "foo",
},
secrets: {
myBuildSecret: DockerBuildSecret.fromSrc("./foo"),
},
},
// ...
});
Alternatively, you can provide your own ContainerImage
instance. There are many ways to construct a ContainerImage
. For example, you can create one from an asset and take full control over how CDK builds your Docker image.
new DockerCluster({
source: ContainerImage.fromAsset("../path/to/source", {
// ...
}),
// ...
});
Or, if you want to build your Docker image outside of CDK, you can create a ContainerImage
from a path to your image's tarball.
new DockerCluster({
source: ContainerImage.fromTarball("./path/to/image.tar"),
// ...
});
Or if the image you need is published to a registry, you can create your
ContainerImage
from a registry path. You can provide credentials in case the registry is private.
new DockerCluster({
source: ContainerImage.fromRegistry("node:20"),
// ...
});
Finally, you can create a ContainerImage
from an image that you have published to an ECR repository.
new DockerCluster({
source: ContainerImage.fromEcrRepository(myRespository, "my-tag"),
// ...
});
The DockerCluster
construct supports both vertical and horizontal scaling.
new DockerCluster(this, "DockerCluster", {
// ...
service: {
// ...
cpu: 1024, // 1vCPU
memory: 4096, // 4GB
tasks: 3,
},
});
Horizontal auto-scaling is also supported.
new DockerCluster(this, "DockerCluster", {
// ...
service: {
// ...
tasks: {
minimum: 1,
maximum: 5,
},
},
});
FAQs
This construct creates a load balanced Fargate service, for which it builds a Docker image from a local directory. A CloudFront distribution is connected to the load balancer.
We found that @codedazur/cdk-docker-cluster demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 22 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.