Compare commits

..

4 Commits

Author SHA1 Message Date
charlesgauthereau 92d64c0b4b chore(release): 1.0.4 2026-01-28 23:31:34 +01:00
Charles GTE abd39e2db1 Merge pull request #8 from Portabase/fix/docker-image
Fix/docker image
2026-01-28 23:31:10 +01:00
charlesgauthereau 48a4ef6cc2 fix: Dockerfile 2026-01-28 23:30:37 +01:00
charlesgauthereau 358bffd675 chore(release): 1.0.4-rc.20 2026-01-28 23:21:30 +01:00
5 changed files with 11 additions and 329 deletions
+8 -203
View File
@@ -1,198 +1,3 @@
#name: Docker Publish
#
#on:
# workflow_call:
# inputs:
# image_name:
# required: false
# type: string
# default: 'portabase/agent'
# add_latest:
# required: false
# type: boolean
# default: false
# target:
# required: false
# type: string
# default: 'prod'
# dockerfile:
# required: false
# type: string
# default: './docker/Dockerfile'
# secrets:
# DOCKER_USERNAME:
# required: true
# DOCKER_PASSWORD:
# required: true
#
#jobs:
# build-and-push:
# runs-on: ubuntu-latest
# permissions:
# packages: write
# contents: read
# steps:
# - name: Check out the repo
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Set up QEMU (enables multi-arch emulation)
# uses: docker/setup-qemu-action@v3
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
#
# - name: Log in to Docker Hub
# uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Set tags
# id: set-tags
# run: |
# REF_NAME=${GITHUB_REF#refs/tags/}
# TAGS="${{ inputs.image_name }}:$REF_NAME"
# if [[ "${{ inputs.add_latest }}" == "true" ]]; then
# TAGS="$TAGS,${{ inputs.image_name }}:latest"
# fi
# echo "tags=$TAGS" >> $GITHUB_OUTPUT
#
# - name: Build and push Docker image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ${{ inputs.dockerfile }}
# platforms: linux/amd64,linux/arm64
# push: true
# tags: ${{ steps.set-tags.outputs.tags }}
# target: ${{ inputs.target }}
#
#name: Docker Publish
#
#on:
# workflow_call:
# inputs:
# image_name:
# required: false
# type: string
# default: 'portabase/agent'
# add_latest:
# required: false
# type: boolean
# default: false
# target:
# required: false
# type: string
# default: 'prod'
# dockerfile:
# required: false
# type: string
# default: './docker/Dockerfile'
# secrets:
# DOCKER_USERNAME:
# required: true
# DOCKER_PASSWORD:
# required: true
#
#jobs:
# build-amd64:
# name: Build AMD64 Image
# runs-on: ubuntu-latest
# outputs:
# image: ${{ steps.set-job-output.outputs.image }}
# steps:
# - uses: actions/checkout@v4
#
# - uses: docker/setup-buildx-action@v3
#
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Set AMD64 image tag
# id: set-tags
# run: |
# REF_NAME=${GITHUB_REF#refs/tags/}
# AMD64_IMAGE="${{ inputs.image_name }}:$REF_NAME-amd64"
# echo "amd64_image=$AMD64_IMAGE" >> $GITHUB_OUTPUT
#
# - name: Build and push AMD64
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ${{ inputs.dockerfile }}
# platforms: linux/amd64
# push: true
# tags: ${{ steps.set-tags.outputs.amd64_image }}
# target: ${{ inputs.target }}
#
# build-arm64:
# name: Build ARM64 Image
# runs-on: ubuntu-24.04-arm
# outputs:
# image: ${{ steps.set-job-output.outputs.image }}
# steps:
# - uses: actions/checkout@v4
#
# - uses: docker/setup-buildx-action@v3
#
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Set ARM64 image tag
# id: set-tags
# run: |
# REF_NAME=${GITHUB_REF#refs/tags/}
# ARM64_IMAGE="${{ inputs.image_name }}:$REF_NAME-arm64"
# echo "arm64_image=$ARM64_IMAGE" >> $GITHUB_OUTPUT
#
# - name: Build and push ARM64
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ${{ inputs.dockerfile }}
# platforms: linux/arm64
# push: true
# tags: ${{ steps.set-tags.outputs.arm64_image }}
# target: ${{ inputs.target }}
#
#
# create-manifest:
# name: Create Multi-Arch Manifest
# runs-on: ubuntu-latest
# needs:
# - build-amd64
# - build-arm64
# steps:
# - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Create Docker manifest
# run: |
# REF_NAME=${GITHUB_REF#refs/tags/}
#
# IMAGE="${{ inputs.image_name }}:$REF_NAME"
# AMD64_IMAGE="$IMAGE-amd64"
# ARM64_IMAGE="$IMAGE-arm64"
#
# echo "AMD64_IMAGE=$AMD64_IMAGE"
# echo "ARM64_IMAGE=$ARM64_IMAGE"
#
# docker manifest create $IMAGE $AMD64_IMAGE $ARM64_IMAGE
# docker manifest push $IMAGE
#
# if [ "${{ inputs.add_latest }}" = "true" ]; then
# docker manifest create ${{ inputs.image_name }}:latest $AMD64_IMAGE $ARM64_IMAGE
# docker manifest push ${{ inputs.image_name }}:latest
# fi
name: Docker Publish
on:
@@ -296,17 +101,17 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create and push manifest
- name: Create and push manifest list
working-directory: /tmp/digests
run: |
AMD64_IMAGE=$(cat /tmp/digests/amd64/image.txt)
ARM64_IMAGE=$(cat /tmp/digests/arm64/image.txt)
DOCKER_IMAGES="$(cat amd64/image.txt) $(cat arm64/image.txt)"
REF_NAME=${GITHUB_REF#refs/tags/}
MANIFEST_IMAGE="${{ inputs.image_name }}:$REF_NAME"
docker manifest create $MANIFEST_IMAGE $AMD64_IMAGE $ARM64_IMAGE
docker manifest push $MANIFEST_IMAGE
docker buildx imagetools create $DOCKER_IMAGES -t $MANIFEST_IMAGE
docker buildx imagetools inspect $MANIFEST_IMAGE
if [ "${{ inputs.add_latest }}" = "true" ]; then
docker manifest create ${{ inputs.image_name }}:latest $AMD64_IMAGE $ARM64_IMAGE
docker manifest push ${{ inputs.image_name }}:latest
fi
docker buildx imagetools create $DOCKER_IMAGES -t ${{ inputs.image_name }}:latest
docker buildx imagetools inspect ${{ inputs.image_name }}:latest
fi
+1 -1
View File
@@ -22,5 +22,5 @@ keywords:
- self-hosted
- portabase
license: Apache-2.0
version: 1.0.4-rc.19
version: 1.0.4
date-released: "2026-01-28"
Generated
+1 -1
View File
@@ -1595,7 +1595,7 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
[[package]]
name = "portabase-agent"
version = "1.0.4-rc.18"
version = "1.0.4-rc.20"
dependencies = [
"anyhow",
"async-trait",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "portabase-agent"
version = "1.0.4-rc.19"
version = "1.0.4"
edition = "2024"
[dependencies]
-123
View File
@@ -110,126 +110,3 @@ COPY --from=base /usr/local/mongodb/bin/ /usr/local/mongodb/bin/
ENV APP_ENV=production
CMD ["/entrypoint.sh"]
# =========================
# Base image (shared)
# =========================
#FROM rust:1.92.0 AS base
#
#RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
# pkg-config \
# libssl-dev \
# tzdata \
# redis-server \
# ca-certificates \
# libpq5 \
# libreadline8 \
# libncurses6 \
# zlib1g \
# curl \
# mariadb-client \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/*
#
#ARG TARGETARCH
#
## =========================
## PostgreSQL client binaries (versions 12-18)
## =========================
#RUN for v in 12 13 14 15 16 17 18; do mkdir -p /usr/lib/postgresql/$v/bin; done
#
#COPY assets/tools/amd64/postgresql/ /tmp/pg-x64/
#COPY assets/tools/arm64/postgresql/ /tmp/pg-arm/
#
#RUN if [ "$TARGETARCH" = "amd64" ]; then \
# for v in 12 13 14 15 16 17 18; do \
# cp -r /tmp/pg-x64/postgresql-$v/bin/* /usr/lib/postgresql/$v/bin/; \
# done; \
# else \
# for v in 12 13 14 15 16 17 18; do \
# cp -r /tmp/pg-arm/postgresql-$v/bin/* /usr/lib/postgresql/$v/bin/; \
# done; \
# fi && \
# rm -rf /tmp/pg-x64 /tmp/pg-arm && \
# chmod +x /usr/lib/postgresql/*/bin/*
#
## =========================
## MongoDB client binaries
## =========================
#COPY assets/tools/${TARGETARCH}/mongodb/ /usr/local/mongodb/
#RUN chmod +x /usr/local/mongodb/bin/*
#
#WORKDIR /app
#
## =========================
## Development image
## =========================
#FROM base AS dev
#
#RUN cargo install cargo-watch
#
#COPY Cargo.toml Cargo.lock ./
#RUN mkdir src && echo "fn main() {}" > src/main.rs
#RUN cargo build
#RUN rm -rf src
#
#COPY entrypoint.sh /entrypoint.sh
#RUN chmod +x /entrypoint.sh
#
#CMD ["/entrypoint.sh"]
#
## =========================
## Builder (production)
## =========================
#FROM base AS builder
#
#ARG TARGETARCH
#
#RUN rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
#
#COPY . .
#
#RUN if [ "$TARGETARCH" = "amd64" ]; then \
# cargo build --release --target x86_64-unknown-linux-gnu && \
# mv /app/target/x86_64-unknown-linux-gnu/release /app/target/release-app; \
# else \
# cargo build --release --target aarch64-unknown-linux-gnu && \
# mv /app/target/aarch64-unknown-linux-gnu/release /app/target/release-app; \
# fi
#
#
#RUN echo "APP_VERSION=$(cargo pkgid | awk -F# '{print $2}')" > /app/version.env
#
## =========================
## Runtime (production)
## =========================
#FROM ubuntu:24.04 AS prod
#
#RUN apt-get update && apt-get install -y \
# redis-server \
# ca-certificates \
# tzdata \
# libpq5 \
# libreadline8 \
# libncurses6 \
# zlib1g \
# mariadb-client \
# && rm -rf /var/lib/apt/lists/*
#
#WORKDIR /app
#
#ARG TARGETARCH
#
#COPY --from=builder /app/target/release-app/app /usr/local/bin/app
#
#COPY --from=builder /app/version.env /app/version.env
#COPY entrypoint.sh /entrypoint.sh
#RUN chmod +x /entrypoint.sh
#
#COPY --from=base /usr/lib/postgresql/ /usr/lib/postgresql/
#COPY --from=base /usr/local/mongodb/bin/ /usr/local/mongodb/bin/
#
#ENV APP_ENV=production
#
#CMD ["/entrypoint.sh"]