Skip to content

Commit

Permalink
docker: refactor docker folder structure
Browse files Browse the repository at this point in the history
- Refactored AS/KBS/rvps docker placement

This change improves Dockerfile readability as current approach (format: Dockerfile.[name]) is not compatible with code inspection in IDEs which can lead to errors.

Signed-off-by: Pawel Proskurnicki <[email protected]>
  • Loading branch information
pawelpros authored and Xynnn007 committed Jul 8, 2024
1 parent a4d89fc commit 202deb9
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/as-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:

- name: Build gRPC AS Container Image
run: |
DOCKER_BUILDKIT=1 docker build -t attestation-service:latest . -f attestation-service/Dockerfile.as-grpc
DOCKER_BUILDKIT=1 docker build -t attestation-service:latest . -f attestation-service/docker/as-grpc/Dockerfile
- name: Build RESTful AS Container Image
run: |
DOCKER_BUILDKIT=1 docker build -t attestation-service:latest . -f attestation-service/Dockerfile.as-restful
DOCKER_BUILDKIT=1 docker build -t attestation-service:latest . -f attestation-service/docker/as-restful/Dockerfile
- name: Build RVPS Container Image
run: |
Docker_BUILDKIT=1 docker build -t rvps:latest . -f rvps/Dockerfile
Docker_BUILDKIT=1 docker build -t rvps:latest . -f rvps/docker/Dockerfile
6 changes: 3 additions & 3 deletions .github/workflows/kbs-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
run: |
DOCKER_BUILDKIT=1 docker build -t kbs:coco-as . -f kbs/docker/Dockerfile; \
DOCKER_BUILDKIT=1 docker build -t kbs:coco-as-openssl --build-arg KBS_FEATURES=coco-as-builtin,openssl,resource,opa . -f kbs/docker/Dockerfile; \
DOCKER_BUILDKIT=1 docker build -t kbs:coco-as-grpc . -f kbs/docker/Dockerfile.coco-as-grpc; \
DOCKER_BUILDKIT=1 docker build -t kbs:coco-as-rhel-ubi . -f kbs/docker/Dockerfile.rhel-ubi; \
DOCKER_BUILDKIT=1 docker build -t kbs:coco-as-ita . -f kbs/docker/Dockerfile.intel-trust-authority
DOCKER_BUILDKIT=1 docker build -t kbs:coco-as-grpc . -f kbs/docker/coco-as-grpc/Dockerfile; \
DOCKER_BUILDKIT=1 docker build -t kbs:coco-as-rhel-ubi . -f kbs/docker/rhel-ubi/Dockerfile; \
DOCKER_BUILDKIT=1 docker build -t kbs:coco-as-ita . -f kbs/docker/intel-trust-authority/Dockerfile
6 changes: 3 additions & 3 deletions .github/workflows/push-as-image-to-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
- coco-as-restful
- rvps
include:
- docker_file: attestation-service/Dockerfile.as-grpc
- docker_file: attestation-service/docker/as-grpc/Dockerfile
tag: coco-as-grpc
name: gRPC CoCo-AS
- docker_file: attestation-service/Dockerfile.as-restful
- docker_file: attestation-service/docker/as-restful/Dockerfile
tag: coco-as-restful
name: RESTful CoCo-AS
- docker_file: rvps/Dockerfile
- docker_file: rvps/docker/Dockerfile
tag: rvps
name: RVPS
runs-on: ${{ matrix.instance }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-kbs-image-to-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
https_crypto: openssl
name: build-in AS
- tag: kbs-grpc-as
docker_file: kbs/docker/Dockerfile.coco-as-grpc
docker_file: kbs/docker/coco-as-grpc/Dockerfile
https_crypto: rustls
name: gRPC AS
- tag: kbs-ita-as
docker_file: kbs/docker/Dockerfile.intel-trust-authority
docker_file: kbs/docker/intel-trust-authority/Dockerfile
https_crypto: rustls
name: Intel Trust Authority AS

Expand Down
3 changes: 1 addition & 2 deletions attestation-service/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
target

Dockerfile.as*
Dockerfile.rvps
docker
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion attestation-service/docs/grpc-as.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Build and run container image
```shell
git clone https://github.com/confidential-containers/trustee
cd trustee
docker build -t coco-as:grpc -f attestation-service/Dockerfile.as-grpc .
docker build -t coco-as:grpc -f attestation-service/docker/as-grpc/Dockerfile .
```

### API
Expand Down
2 changes: 1 addition & 1 deletion attestation-service/docs/restful-as.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Build and run container image
```shell
git clone https://github.com/confidential-containers/trustee
cd trustee
docker build -t coco-as:restful -f attestation-service/Dockerfile.as-restful .
docker build -t coco-as:restful -f attestation-service/docker/as-restful/Dockerfile .
```

### HTTPS support
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
kbs:
build:
context: .
dockerfile: ./kbs/docker/Dockerfile.coco-as-grpc
dockerfile: kbs/docker/coco-as-grpc/Dockerfile
#image: ghcr.io/confidential-containers/key-broker-service:latest
command: [
"/usr/local/bin/kbs",
Expand All @@ -23,7 +23,7 @@ services:
as:
build:
context: .
dockerfile: ./attestation-service/Dockerfile.as-grpc
dockerfile: attestation-service/docker/as-grpc/Dockerfile
#image: ghcr.io/confidential-containers/attestation-service:latest
ports:
- "50004:50004"
Expand All @@ -46,7 +46,7 @@ services:
#image: ghcr.io/confidential-containers/reference-value-provider-service:latest
build:
context: .
dockerfile: ./rvps/Dockerfile
dockerfile: rvps/docker/Dockerfile
restart: always # keep the server running
ports:
- "50003:50003"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions rvps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All the reference values will be stored inside RVPS. When AS queries specific so

## Architecture

RVPS contains the following componants:
RVPS contains the following components:

- Pre-Processor : Pre-Processor contains a set of Wares (like Middleware). The Wares can process the input Message and then deliver it to the Extractors.

Expand Down Expand Up @@ -72,7 +72,7 @@ By default listen to `localhost:50003` to wait for requests
We can build RVPS docker image

```bash
cd .. && docker build -t rvps -f rvps/Dockerfile .
cd .. && docker build -t rvps -f rvps/docker/Dockerfile .
```

Run
Expand Down
File renamed without changes.

0 comments on commit 202deb9

Please sign in to comment.