Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build_config_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
paths:
- '.github/workflows/build_config_server.yaml'
- 'config-server/**'
- 'build.ps1'
push:
branches:
- main
paths:
- '.github/workflows/build_config_server.yaml'
- 'config-server/**'
- 'build.ps1'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -37,7 +39,7 @@ jobs:
run: ./build.ps1 -Name '${{ env.IMAGE_NAME }}' -Registry '${{ env.REGISTRY }}' -Tag '${{ env.TAG }}'
shell: pwsh
env:
TAG: ${{ github.event_name == 'pull_request' && format('-t {0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }}
TAG: ${{ github.event_name == 'pull_request' && format('{0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }}

- name: Login to container registry
uses: docker/login-action@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_eureka_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
paths:
- '.github/workflows/build_eureka_server.yaml'
- 'eureka-server/**'
- 'build.ps1'
push:
branches:
- main
paths:
- '.github/workflows/build_eureka_server.yaml'
- 'eureka-server/**'
- 'build.ps1'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -37,7 +39,7 @@ jobs:
run: ./build.ps1 -Name '${{ env.IMAGE_NAME }}' -Registry '${{ env.REGISTRY }}' -Tag '${{ env.TAG }}'
shell: pwsh
env:
TAG: ${{ github.event_name == 'pull_request' && format('-t {0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }}
TAG: ${{ github.event_name == 'pull_request' && format('{0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }}

- name: Login to container registry
uses: docker/login-action@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_springboot_admin_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
paths:
- '.github/workflows/build_springboot_admin_server.yaml'
- 'spring-boot-admin/**'
- 'build.ps1'
push:
branches:
- main
paths:
- '.github/workflows/build_springboot_admin_server.yaml'
- 'spring-boot-admin/**'
- 'build.ps1'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -37,7 +39,7 @@ jobs:
run: ./build.ps1 -Name '${{ env.IMAGE_NAME }}' -Registry '${{ env.REGISTRY }}' -Tag '${{ env.TAG }}'
shell: pwsh
env:
TAG: ${{ github.event_name == 'pull_request' && format('-t {0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }}
TAG: ${{ github.event_name == 'pull_request' && format('{0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }}

- name: Login to container registry
uses: docker/login-action@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_uaa_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
paths:
- '.github/workflows/build_uaa_server.yaml'
- 'uaa-server/**'
- 'build.ps1'
push:
branches:
- main
paths:
- '.github/workflows/build_uaa_server.yaml'
- 'uaa-server/**'
- 'build.ps1'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -37,7 +39,7 @@ jobs:
run: ./build.ps1 -Name '${{ env.IMAGE_NAME }}' -Registry '${{ env.REGISTRY }}' -Tag '${{ env.TAG }}'
shell: pwsh
env:
TAG: ${{ github.event_name == 'pull_request' && format('-t {0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }}
TAG: ${{ github.event_name == 'pull_request' && format('{0}/{1}:pr-{2}', env.REGISTRY, env.IMAGE_NAME, github.event.number) || '' }}

- name: Login to container registry
uses: docker/login-action@v3
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ build/

# MacOS
.DS_Store

# native build artifacts
*.zip
*-temp/
55 changes: 0 additions & 55 deletions README.adoc

This file was deleted.

72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# SteeltoeOSS Docker Images

GitHub repo for server images to use for local development with SteeltoeOSS.

## Building

### Pre-Requisites

The following tools are required to build any image in this repository:

1. PowerShell or pwsh
1. Docker or Podman

#### Config Server, Eureka and Spring Boot Admin

The process for these images is to download starter projects from start.spring.io, apply patches to those files and produce images using [the Gradle Plugin](https://docs.spring.io/spring-boot/gradle-plugin/packaging-oci-image.html).
To build these images you must also have:

1. Access to start.spring.io
1. `patch` available in the path or installed with Git for Windows
1. JDK 21

If you do not already have a JDK installed, consider using [Scoop](https://scoop.sh/):

```shell
# Permit executing remote-signed scripts
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Install Scoop
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
# Add the Java bucket
scoop bucket add java
# Install the JDK
scoop install java/openjdk21
```

### Build a specific image

```shell
./build.ps1 config-server
```

## Running

### List the created images

```shell
docker images
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run ./build.ps1 -List, it prints:

Name
----
config-server
config-server-temp
eureka-server
spring-boot-admin
uaa-server

Should the config-server-temp directory be removed after completion of the script?

See [Common Tasks](https://github.com/SteeltoeOSS/Samples/blob/main/CommonTasks.md/) for instructions on how to run the various docker images.

## Images

| Name | Description |
| ---- | ----------- |
| [steeltoe.azurecr.io/config-server](config-server/) | Spring Cloud Config Server |
| [steeltoe.azurecr.io/eureka-server](eureka-server/) | Netflix Eureka Server |
| [steeltoe.azurecr.io/spring-boot-admin](spring-boot-admin/) | Spring Boot Admin |
| [steeltoe.azurecr.io/uaa-server](uaa-server/) | Cloud Foundry UAA Server |

## Debug Image Building

### Inspect Container Contents

Via [StackOverflow](https://stackoverflow.com/questions/32353055/how-to-start-a-stopped-docker-container-with-a-different-command/39329138#39329138), here are the commands to list files in a stopped container.

1. Find the id of the stopped container
* `docker ps -a`
1. Commit the stopped container to a new image: test_image.
* `docker commit $CONTAINER_ID test_image`
1. Run the new image in a new container with a shell.
* `docker run -ti --entrypoint=sh test_image`
Loading