Skip to content

Commit 2a701c0

Browse files
committed
update readme
1 parent 88fc2f6 commit 2a701c0

2 files changed

Lines changed: 21 additions & 17 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
33
{
4-
"name": "Ubuntu",
4+
"name": "eps-devcontainers",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66
"build": {
77
"dockerfile": "Dockerfile",

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,20 @@ Images under languages should point to a dockerfile under src/common that is bas
121121
We use trivy to scan for vulnerabilities in the built docker images. Known vulnerabilities in the base image are in `src/common/.trivyignore.yaml`. Vulnerabilities in specific images are in `.trivyignore.yaml` file in each images folder. These are combined before running a scan to exclude all known vulnerabilities
122122

123123
# Pull requests and merge to main process
124-
For each pull request, and merge to main, images are built and scanned using trivy, but the images are not pushed to github container registry
125-
Docker images are built for each pull request, and on merges to main.
126-
Docker images are built for amd64 and arm64 architecture, and a combined manifest is created and pushed as part of the build.
127-
Images are also created with user vscode mapped to user id 1001 so they can be used by github actions.
124+
For each pull request, and merge to main, images are built and scanned using trivy, and pushed to github docker registry.
125+
Docker images are built for amd64 and arm64 architecture, and a combined manifest is created and pushed as part of the build.
126+
The main images have a vscode user with id 1000. A separately tagged image is also created with user vscode mapped to user id 1001 so they can be used by github actions.
128127

129128
The base image is built first, and then language images, and finally project images.
130129

131130
Docker images are scanned for vulnerabilities using trivy as part of a build step, and the build fails if vulnerabilities are found not in .trivyignore file.
132131

133-
For pull requests, images are tagged with the pr-<pull request id>-<short commit sha>.
134-
For merges to main, images are tagged with the <short commit sha>.
135-
Github actions images are tagged with githubactions-<tag>
132+
For pull requests, images are tagged with the pr-{pull request id}-{short commit sha}.
133+
For merges to main, images are tagged with the {short commit sha}.
134+
Github actions images are tagged with githubactions-{tag}
135+
Amd64 images are tagged with {tag}-amd64
136+
Arm64 images are tagged with {tag}-arm64
137+
Combined image manifest image is just tagged with {tag} so can be included in devcontainer.json and the correct image is pulled based on the host architecture.
136138

137139
When a pull request is merged to main or closed, all associated images are deleted from the registry using the github workflow delete_old_images
138140

@@ -221,7 +223,7 @@ CONTAINER_NAME=fhir_facade_api \
221223
make shell-image
222224
```
223225

224-
## Using local or pull request images
226+
## Using local or pull request images in visual studio code
225227
You can use local or pull request images by changing IMAGE_VERSION in devcontainer.json.
226228
For an image built locally, you should put the IMAGE_VERSION=local-build.
227229
For an image built from a pull request, you should put the IMAGE_VERSION=<tag of image as show in pull request job>.
@@ -247,26 +249,28 @@ poetry run python \
247249
```
248250

249251
## Common makefile targets
250-
There are a set of common Makefiles that are defined in `src/base/.devcontainer/makefiles` and are included from `common.mk` that are installed to all built container images.
252+
There are a set of common Makefiles that are defined in `src/base/.devcontainer/makefiles` and are included from `common.mk`. These are installed to all built container images.
251253

252254
This should be added to the end of each projects Makefile to include them
253255
```
254256
%:
255257
@$(MAKE) -f /usr/local/share/eps/Mk/common.mk $@
256258
```
259+
### Targets
260+
The following targets are defined. These are needed for quality checks to run. Some targets are project specific and so should be overridden in the projects Makefile.
257261

258262
Build targets (`build.mk`)
259-
- `install` - placeholder target (currently not implemented)
260-
- `install-node` - placeholder target (currently not implemented)
261-
- `docker-build` - placeholder target (currently not implemented)
262-
- `compile` - placeholder target (currently not implemented)
263+
- `install` - placeholder target - should be overridden locally
264+
- `install-node` - placeholder target - should be overridden locally
265+
- `docker-build` - placeholder target - should be overridden locally
266+
- `compile` - placeholder target - should be overridden locally
263267

264268
Check targets (`check.mk`)
265-
- `lint` - placeholder target (currently not implemented)
266-
- `test` - placeholder target (currently not implemented)
269+
- `lint` - placeholder target - should be overridden locally
270+
- `test` - placeholder target - should be overridden locally
267271
- `shellcheck` - runs shellcheck on `scripts/*.sh` and `.github/scripts/*.sh` when files exist
268272
- `cfn-lint` - runs `cfn-lint` against `cloudformation/**/*.yml|yaml` and `SAMtemplates/**/*.yml|yaml`
269-
- `cdk-synth` - placeholder target (currently not implemented)
273+
- `cdk-synth` - placeholder target - should be overridden locally
270274
- `cfn-guard-sam-templates` - validates SAM templates against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
271275
- `cfn-guard-cloudformation` - validates `cloudformation` templates against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
272276
- `cfn-guard-cdk` - validates `cdk.out` against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`

0 commit comments

Comments
 (0)