Skip to content

Commit

Permalink
update readme to build on multi-stage.
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed May 23, 2024
1 parent 8fa4bb9 commit ef21980
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,22 @@ After the build is completed, the built binary is in the container. You can copy
$ docker cp $(docker ps -lq):/app/aws-sdk-client-go .
```

### Docker Multi-stage build

`ghcr.io/fujiwara/aws-sdk-client-go:builder` can use as a builder image in a multi-stage build.

Run `./build-in-docker.sh` in the container to build the client. The built binary is in the `/app` directory. You can copy it to the final image.

```Dockerfile
FROM ghcr.io/fujiwara/aws-sdk-client-go:builder AS builder
ENV AWS_SDK_CLIENT_GO_GEN=ecs,firehose,s3
ENV GIT_REF=v0.0.13
RUN ./build-in-docker.sh

FROM debian:bookworm-slim
COPY --from=builder /app/aws-sdk-client-go /usr/local/bin/aws-sdk-client-go
```

## Performance comparison

Example of execution `sts get-caller-identity` on 0.25vCPU Fargate(AMD64).
Expand Down

0 comments on commit ef21980

Please sign in to comment.