-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk): introducing
sim.Container
(#6022)
The `sim.Container` resource allows running containers in the Wing Simulator. ```js let c = new sim.Container( name: "http-echo", image: "hashicorp/http-echo", containerPort: 5678, args: ["-text=bang"], ); test "send request" { http.get("http://localhost:{c.hostPort}"); } ``` There is also support for building containers from a local `Dockerfile`: ```js new sim.Container( name: "my-service", image: "./my-service", containerPort: 8080, ); ``` Migrated the `redis` and `dynamodb` to use this new resource instead of starting/stopping their containers by hand. ### Motivation Standardize how we manage containers in the Wing Simulator so we can improve the DX across the board and offer a nice UI in the Wing Console for this. ### Misc Added a couple of utilities: * `util.md5(dir)` - calculates the md5 hash on all the files in a directory (recursively). * `util.glob(pattern)` - returns the files matching a glob pattern. ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [x] Docs updated (only required for features) - [x] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
- Loading branch information
Showing
52 changed files
with
1,704 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.