-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker container support for ECS Server
- Build new `aws-sso-cli-ecs-server` image and publish on Docker Hub - Makes it easy to run ecs server inside of a docker container as a local service - Automatically configures the SSL key pair & bearer token for you Fixes: #569
- Loading branch information
1 parent
42feabc
commit 6bfa556
Showing
16 changed files
with
743 additions
and
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish Docker image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: synfinatic | ||
password: ${{ secrets.DOCKER_HUB_SECRET }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: synfinatic/aws-sso-cli-ecs-server | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Stage 1: Build stage | ||
FROM golang:1.21-alpine AS builder | ||
RUN apk --no-cache add git gcc musl-dev make | ||
WORKDIR /app | ||
|
||
# Copy the source code into the container | ||
COPY . . | ||
|
||
# Build the Go application | ||
RUN make | ||
|
||
# Stage 2: Final stage | ||
FROM alpine:latest | ||
|
||
WORKDIR /app | ||
# Copy the built binary from the previous stage | ||
COPY --from=builder /app/dist/aws-sso . | ||
|
||
# Set the entrypoint for the container | ||
EXPOSE 4144 | ||
|
||
ENTRYPOINT ["./aws-sso", "ecs", "run", "--docker"] |
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
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
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.