Skip to content

Commit

Permalink
Merge pull request #185 from Achiefs/174-release-packages-script
Browse files Browse the repository at this point in the history
Added explicit architecture Dockerfiles
  • Loading branch information
okynos authored Jan 18, 2025
2 parents c5a24be + df8039a commit 2f7552b
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 4 deletions.
13 changes: 13 additions & 0 deletions pkg/deb/docker/Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:xenial

RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \
sed -i 's|deb http://security|#deb http://security|g' /etc/apt/sources.list && \
apt update && \
apt install -y curl devscripts equivs tar gcc gzip pkg-config git && \
mkdir -p /tmp/output

# It requires to copy the entrypoint.sh to the docker folder.
ADD entrypoint.sh /usr/local/bin/entrypoint_deb.sh
RUN chmod +x /usr/local/bin/entrypoint_deb.sh

ENTRYPOINT [ "/usr/local/bin/entrypoint_deb.sh" ]
13 changes: 13 additions & 0 deletions pkg/deb/docker/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:xenial

RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \
sed -i 's|deb http://security|#deb http://security|g' /etc/apt/sources.list && \
apt update && \
apt install -y curl devscripts equivs tar gcc gzip pkg-config git && \
mkdir -p /tmp/output

# It requires to copy the entrypoint.sh to the docker folder.
ADD entrypoint.sh /usr/local/bin/entrypoint_deb.sh
RUN chmod +x /usr/local/bin/entrypoint_deb.sh

ENTRYPOINT [ "/usr/local/bin/entrypoint_deb.sh" ]
5 changes: 3 additions & 2 deletions pkg/deb/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash

set -xe

ref=$1

mkdir -p /tmp/output
mkdir -p /tmp/repo
cd /tmp/repo
git clone https://github.com/Achiefs/fim.git -b ${ref} --depth=1
cd fim/pkg/deb
./builder.sh
cp fim_*.deb /tmp/output/
chown 1000:1000 /tmp/output/*
chown 1000:1000 /tmp/output/fim_*.deb
10 changes: 10 additions & 0 deletions pkg/rpm/docker/Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM redhat/ubi8:8.8-1067.1698056881

RUN yum update -y && \
yum install -y rpm-build tar gcc git && \
mkdir -p /tmp/output

ADD entrypoint.sh /usr/local/bin/entrypoint_rpm.sh
RUN chmod +x /usr/local/bin/entrypoint_rpm.sh

ENTRYPOINT [ "/usr/local/bin/entrypoint_rpm.sh" ]
13 changes: 13 additions & 0 deletions pkg/rpm/docker/Dockerfile.x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM centos:7

RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/* && \
sed -i 's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/*

RUN yum update -y && \
yum install -y rpm-build tar gcc git && \
mkdir -p /tmp/output

ADD entrypoint.sh /usr/local/bin/entrypoint_rpm.sh
RUN chmod +x /usr/local/bin/entrypoint_rpm.sh

ENTRYPOINT [ "/usr/local/bin/entrypoint_rpm.sh" ]
5 changes: 3 additions & 2 deletions pkg/rpm/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash

set -xe

ref=$1

mkdir -p /tmp/output
mkdir -p /tmp/repo
cd /tmp/repo
git clone https://github.com/Achiefs/fim.git -b ${ref} --depth=1
cd fim/pkg/rpm
./builder.sh
cp fim-*.rpm /tmp/output/
chown 1000:1000 /tmp/output/*
chown 1000:1000 /tmp/output/fim-*.rpm

0 comments on commit 2f7552b

Please sign in to comment.