Skip to content

Commit

Permalink
Build slim image
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBellew committed Jun 1, 2024
1 parent 6db1abb commit 438d6cb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx
- name: Build and push base image
- name: Build and push slim image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.base
file: ./packaging/slim/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/pg-ferret:latest
tags: ${{ secrets.DOCKER_USERNAME }}/pg-ferret-slim:latest
platforms: linux/arm64, linux/amd64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
Expand All @@ -54,7 +54,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.all-in-one
file: ./packaging/all-in-one/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/pg-ferret-all-in-one:latest
platforms: linux/arm64, linux/amd64
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ The all-in-one image provides Grafana and Tempo built in, but if you have your o
#### 1. Start the slim image

```sh
docker pull cbellew/pg-ferret:latest &&
docker pull cbellew/pg-ferret-slim:latest &&
docker run -it \
-e POSTGRES_DB=mydb \
-e POSTGRES_USER=myuser \
-e POSTGRES_PASSWORD=mypass \
-e OTEL_TRACING_ENDPOINT=http://myoteltracingbackend:4317 \
--privileged -p 5432:5432 \
cbellew/pg-ferret:latest
cbellew/pg-ferret-slim:latest
```

#### 2. Wait a second and fire a test query
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
depends_on:
- tempo
volumes:
- ./packaging/base/tempo-datasource.yaml:/etc/grafana/provisioning/datasources/tempo-datasource.yaml
- ./packaging/slim/tempo-datasource.yaml:/etc/grafana/provisioning/datasources/tempo-datasource.yaml
environment:
GF_AUTH_DISABLE_LOGIN_FORM: "true"
GF_AUTH_ANONYMOUS_ENABLED: "true"
Expand All @@ -30,7 +30,7 @@ services:
postgres:
build:
context: .
dockerfile: ./packaging/base/Dockerfile
dockerfile: ./packaging/slim/Dockerfile
container_name: postgres
environment:
POSTGRES_DB: mydb
Expand Down
2 changes: 1 addition & 1 deletion packaging/all-in-one/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cbellew/pg-ferret:latest
FROM cbellew/pg-ferret-slim:latest

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion packaging/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ FROM cbellew/pg-ferret-postgres-16:latest
WORKDIR /app
COPY --from=builder /app/target/release/userspace-collector /usr/local/bin/userspace-collector

COPY /packaging/base/start.sh /usr/local/bin/start.sh
COPY /packaging/slim/start.sh /usr/local/bin/start.sh
RUN chmod +x /usr/local/bin/start.sh

EXPOSE 5432
Expand Down

0 comments on commit 438d6cb

Please sign in to comment.