Commit Graph

6 Commits

Author SHA1 Message Date
Donatas Abraitis
7be59f7b7c docker: Keep and copy .apk files after they are built
For debugging purposes and/or to distribute them somewhere else.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-09-20 23:23:55 +03:00
Stephen Worley
3728cc8e12 docker: update alpine build enable set own version
Add ability to set your own env for the version of the docker
container alpine image. This is useful for applications like GNS3
who pin a specific version to look for when they boot up. When you build
locally to test your code you can just set the version to 0 so you don't
have to update configs/scripts looking for a specific image version.

Also fix a shebang in docker start for alpine.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-01-04 13:14:51 -05:00
Christian Franke
eab6daa2a0 docker/alpine: Update buildscript to keep the docker image around
Don't delete the Alpine docker image after the build.

Also, extract the packages from the build stage, so that we can
remove them from the final image.
2019-03-27 15:39:54 +01:00
Christian Franke
eb3400c12b docker/alpine/build.sh: Install packages to docker/alpine
The packages resulting from the Alpine build should be installed
to docker/alpine and not to the general docker directory.
2019-03-26 18:33:45 +01:00
Arthur Jones
19e622d51e alpine packaging: build packages and base image directly from git
Currently, we tar up the git repo before building alpine packages.
This ensures that the packages we're building are exactly what is
checked in.  But, in practice, this restriction causes us to not
be able to build off of git contexts, which is a convenient feature
especially when using docker-compose.

So, here, we build the alpine packages directly from the contents
of the current directory and we install the packages into a base
image to ease downstream consumption.  There is still work to be
done in that area, as we need to package up the daemons, frr user
and all the rest, but that's for later...

Testing-done:

Built directly from the git repo, built from a reference to the
git repo and built using docker-compose, all seemed to work.  Also,
tested by @leleobhz and seems to build fine.

Thanks to Leonardo Amaral (@leleobhz) for reporting the issue and for
the original idea for a fix.

Issue: https://github.com/FRRouting/frr/issues/2024
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
2018-04-04 10:05:44 -07:00
Arthur Jones
79bb456408 docker build: build Alpine Linux dev packages in docker
Building alpine packages in a "standard" distro can be
complicated due to the limited scope of the distro (embedded
and small docker images).  Building in a VM is one possibility,
but docker support for alpine is very good (default docker images
come in alpine due to the very small size).

Here, we want to package up the current git repo into apk packages
that can be easily installed in alpine linux using the apk tool.
This support is not intended to package released versions of
apk packages, that, if it comes to be, should be done here:

git://git.alpinelinux.org/aports

We're content here to build packages that can be used by developers
to try out frr in docker and other alpine environments.

This is a very minimal environment, we don't support importing
keys (so, installing the packages with apk requires the
--allow-untrusted option).  In addition, we can't use the
git commit id in hex as version tag, as alpine doesn't support hex
digits in the version string.  So, we need to convert the git hash
to decimal before tagging the package with the extra version.
This is yucky, but I can't think of another way to get a
unique version per package.  The alpine way (using a numeric date),
only works for released packages, not for dev packages.

Issue: https://github.com/FRRouting/frr/issues/1859
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
2018-03-19 13:05:26 -07:00