mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-11-23 00:52:00 +01:00
fix docker arm64 builds (#1017)
This commit is contained in:
parent
5f7ce6b6a5
commit
058ad92093
@ -115,16 +115,30 @@ jobs:
|
|||||||
command: "sudo docker exec -it linux_priviledged_container pbuilder --create --basetgz /data/debian_base.tgz --distribution << parameters.debian_codename >>"
|
command: "sudo docker exec -it linux_priviledged_container pbuilder --create --basetgz /data/debian_base.tgz --distribution << parameters.debian_codename >>"
|
||||||
- run: ls -la /data
|
- run: ls -la /data
|
||||||
- run: sudo docker exec -it linux_priviledged_container pbuilder --build --basetgz /data/debian_base.tgz --debbuildopts "-sa" /fastnetmon_$(sudo docker exec -it linux_priviledged_container head -n 1 fastnetmon-debian-salsa/debian/changelog|awk '{print $2}'|sed 's/[()]//g').dsc
|
- run: sudo docker exec -it linux_priviledged_container pbuilder --build --basetgz /data/debian_base.tgz --debbuildopts "-sa" /fastnetmon_$(sudo docker exec -it linux_priviledged_container head -n 1 fastnetmon-debian-salsa/debian/changelog|awk '{print $2}'|sed 's/[()]//g').dsc
|
||||||
build_docker_x86_64:
|
build_docker:
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-2204:current
|
image: ubuntu-2204:current
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: docker build -t ghcr.io/pavel-odintsov/fastnetmon-community:<< pipeline.parameters.fastnetmon_build_version >> -t ghcr.io/pavel-odintsov/fastnetmon-community:latest - < src/Dockerfile
|
- run:
|
||||||
- run: sudo docker images
|
name: Extract GitHub Username
|
||||||
- run: echo $CR_PAT | sudo docker login ghcr.io -u pavel-odintsov --password-stdin
|
command: |
|
||||||
- run: sudo docker push ghcr.io/pavel-odintsov/fastnetmon-community:<< pipeline.parameters.fastnetmon_build_version >>
|
GH_USERNAME=$(echo "<< pipeline.project.git_url >>" | sed -n 's#.*/\([^/]*\)/.*#\1#p')
|
||||||
- run: sudo docker push ghcr.io/pavel-odintsov/fastnetmon-community:latest
|
echo "GitHub username is $GH_USERNAME"
|
||||||
|
echo "export GH_USERNAME=$GH_USERNAME" >> $BASH_ENV
|
||||||
|
- run:
|
||||||
|
name: Build Docker images
|
||||||
|
command: |
|
||||||
|
echo $CR_PAT | docker login ghcr.io -u $GH_USERNAME --password-stdin
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
|
docker buildx create --use
|
||||||
|
docker buildx inspect --bootstrap
|
||||||
|
docker buildx build \
|
||||||
|
--file src/Dockerfile \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--tag ghcr.io/$GH_USERNAME/fastnetmon-community:<< pipeline.parameters.fastnetmon_build_version >> \
|
||||||
|
--tag ghcr.io/$GH_USERNAME/fastnetmon-community:latest \
|
||||||
|
--push .
|
||||||
build_gce:
|
build_gce:
|
||||||
machine:
|
machine:
|
||||||
# We use this image because it uses GCE instead of AWS for testing
|
# We use this image because it uses GCE instead of AWS for testing
|
||||||
@ -134,14 +148,6 @@ jobs:
|
|||||||
resource_class: large
|
resource_class: large
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
build_docker_arm64:
|
|
||||||
machine:
|
|
||||||
image: ubuntu-2204:current
|
|
||||||
resource_class: arm.large
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: docker build --build-arg installer_file_name=installer_arm64 -t ghcr.io/pavel-odintsov/fastnetmon-community:1.2.3 -t ghcr.io/pavel-odintsov/fastnetmon-community:latest - < src/Dockerfile
|
|
||||||
- run: sudo docker images
|
|
||||||
build_fedora_upstream:
|
build_fedora_upstream:
|
||||||
parameters:
|
parameters:
|
||||||
docker_image:
|
docker_image:
|
||||||
@ -436,10 +442,8 @@ workflows:
|
|||||||
distro_name: "debian"
|
distro_name: "debian"
|
||||||
resource_class: "arm.large"
|
resource_class: "arm.large"
|
||||||
debian_package_architecture: "arm64"
|
debian_package_architecture: "arm64"
|
||||||
- build_docker_x86_64:
|
- build_docker:
|
||||||
name: "Build Docker image on x86_64 platform"
|
name: "Build Docker images"
|
||||||
# - build_docker_arm64:
|
|
||||||
# name: "Build Docker image on ARM64 platform"
|
|
||||||
- build_debian_upstream_package:
|
- build_debian_upstream_package:
|
||||||
name: "Debian Sid Upstream Build"
|
name: "Debian Sid Upstream Build"
|
||||||
debian_codename: "sid"
|
debian_codename: "sid"
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
ARG installer_file_name=installer
|
|
||||||
|
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget && wget https://install.fastnetmon.com/$installer_file_name -Oinstaller && chmod +x installer && ./installer -install_community_edition
|
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget
|
||||||
|
|
||||||
LABEL org.opencontainers.image.source https://github.com/pavel-odintsov/fastnetmon
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
|
wget https://install.fastnetmon.com/installer -O installer; \
|
||||||
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
|
wget https://install.fastnetmon.com/installer_arm64 -O installer; \
|
||||||
|
fi && \
|
||||||
|
chmod +x installer && \
|
||||||
|
./installer -install_community_edition
|
||||||
|
|
||||||
CMD /opt/fastnetmon/fastnetmon
|
LABEL org.opencontainers.image.source=https://github.com/pavel-odintsov/fastnetmon
|
||||||
|
|
||||||
|
CMD ["/opt/fastnetmon-community/app/bin/fastnetmon"]
|
||||||
|
Loading…
Reference in New Issue
Block a user