LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 08-31-2021, 02:15 AM   #1
Pigi_102
Member
 
Registered: Aug 2008
Posts: 188

Rep: Reputation: 22
slackbuild docker-ce on RasPI ?


Hi all,
I need to rebuild docker-ce for my installation that is not a latest current and the Sarpi packages unfortunally goes in segmentation violation.

I've been able to rebuild containerd by using the google-go-lang provided and everything works as expected, but no joy for docker-ce ( as said )

Can someone provide the slackbuild for it ?

Thanks in advance.

Pierluigi
 
Old 08-31-2021, 03:45 AM   #2
Pigi_102
Member
 
Registered: Aug 2008
Posts: 188

Original Poster
Rep: Reputation: 22
Nevermind. I managed to build docker by modifying an old slackbuild and fixing some little problems.
To get all needed pieces you have to download the docker-ce from https://github.com/docker/docker-ce selecting branch 19.03 and getting the zip from there:
https://github.com/docker/docker-ce/archive/refs/heads/19.03.zip
after that you unzip the file and create a tar file:

Code:
unzip docker-ce-19.03.zip
cat docker-ce-19.03/VERSION 
mv docker-ce-19.03/ docker-ce-$( cat docker-ce-19.03/VERSION )
and create the tar file accordling ( by using the result of the VERSION before ):
Code:
tar cf docker-ce-19.03.15.tar.gz docker-ce-19.03.15
After this you set the VERSION var in the following slackbuild:

Code:
#!/bin/sh

# Slackware build script for docker

# Copyright 2014-2015 Vincent Batts <vbatts@hashbangbash.com>
# Copyright 2017-2019 Audrius Kažukauskas <audrius@neutrino.lt>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PRGNAM=docker
VERSION=${VERSION:-19.03.15}
GITHASH=${GITHASH:-6247962}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

SRCNAM=$PRGNAM-ce

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

mkdir -p build/src/github.com/docker
( cd build/src/github.com/docker
  ln -s $TMP/$SRCNAM-$VERSION/components/engine docker
  ln -s $TMP/$SRCNAM-$VERSION/components/cli cli
)

# Build daemon.
cd components/engine
  DOCKER_GITCOMMIT=$GITHASH \
  DOCKER_BUILDTAGS="seccomp" \
  VERSION=$(cat ../../VERSION) \
  GOPATH=$TMP/$SRCNAM-$VERSION/build \
  ./hack/make.sh dynbinary

  #install -D -m 0755 $(readlink -f bundles/latest/dynbinary-daemon/dockerd) $PKG/usr/bin/dockerd
  install -D -m 0755 $(readlink -f bundles/dynbinary-daemon/dockerd) $PKG/usr/bin/dockerd
cd -

# Build CLI.
cd components/cli
DISABLE_WARN_OUTSIDE_CONTAINER=1 \
make dynbinary \
  GITCOMMIT=$GITHASH \
  VERSION=$(cat ../../VERSION) \
  GOPATH=$TMP/$SRCNAM-$VERSION/build

install -D -m 0755 build/docker-linux-arm $PKG/usr/bin/docker
cd -

# Integrate required components.
ln -s runc $PKG/usr/bin/docker-runc
ln -s containerd $PKG/usr/bin/docker-containerd
ln -s containerd-shim $PKG/usr/bin/docker-containerd-shim
ln -s ctr $PKG/usr/bin/docker-containerd-ctr
ln -s tini-static $PKG/usr/bin/docker-init

# Completion.
( cd components/cli/contrib/completion
  install -D -m 0644 bash/docker $PKG/usr/share/bash-completion/completions/docker
  install -D -m 0644 zsh/_docker $PKG/usr/share/zsh/site-functions/_docker
  install -D -m 0644 fish/docker.fish $PKG/usr/share/fish/vendor_completions.d/docker.fish
)

install -D -m 0644 $CWD/config/docker.default $PKG/etc/default/docker.new
install -D -m 0644 $CWD/config/docker.logrotate $PKG/etc/logrotate.d/docker.new
install -D -m 0644 $CWD/config/rc.docker $PKG/etc/rc.d/rc.docker.new

# Install udev rules.
install -D -m 0644 components/engine/contrib/udev/80-docker.rules \
  $PKG/lib/udev/rules.d/80-docker.rules

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  CHANGELOG.md components/engine/LICENSE components/engine/NOTICE README.md \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
all the other files ( slack-desc and doinst.sh and config directory) are available from : https://slackbuilds.org/repository/14.2/system/docker/

Obviuosly my bigger thanks goes to SBo and whoever wrote the initial slackbuild ( it should be Audrius Kažukauskas )

Hope this helps someone.


Pigi

Last edited by Pigi_102; 08-31-2021 at 03:51 AM.
 
2 members found this post helpful.
Old 08-31-2021, 03:48 AM   #3
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by Pigi_102 View Post
I need to rebuild docker-ce for my installation that is not a latest current and the Sarpi packages unfortunally goes in segmentation violation.

I've been able to rebuild containerd by using the google-go-lang provided and everything works as expected, but no joy for docker-ce ( as said )

Can someone provide the slackbuild for it ?

Thanks in advance.
I've rebuilt the latest docker-20.10.8 version and uploaded it. Try it, test it, and see how it goes.

Download it from: https://sarpi.penthux.net/index.php?p=rpiarmcurrentpkgs

Anything else you need, just let me know.

[EDIT] If you've found your own solution that's good too.

Last edited by Exaga; 08-31-2021 at 03:49 AM. Reason: edit
 
1 members found this post helpful.
Old 08-31-2021, 08:04 AM   #4
Pigi_102
Member
 
Registered: Aug 2008
Posts: 188

Original Poster
Rep: Reputation: 22
And I forgot the thanks to you, Exaga, for providing google-go and all the other nice stuff you do for sarpi !!!

I will give a try to your docker-20 to see if it runs on my badly damaged current
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] slackware arm on raspi eth2 problem r2512s1925 Slackware 1 11-09-2013 05:26 PM
LXer: Home automation kit includes Arduino, RasPi dev boards LXer Syndicated Linux News 0 07-20-2013 12:12 PM
Linksys WRT54GS2 Router forward port 22 to RasPi as Proxy Server: Problem doni49 Linux - Networking 3 06-14-2013 08:43 PM
error trying to install lsb on fedora raspi remis frieza Fedora 4 01-09-2013 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 10:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration