Some of GitHub actions were relying on cache from apt-get update
being available.
My previous changes broke those GitHub actions.
Add `apt-get update` as one of last commands, which adds ~20Mb,
but still 2.04Gb -> 2.01Gb for vyos-build comparing with Dockerfile
without cache cleaning.
No changes for vyos image as I hope it is not used in any automatic
scripts that use `apt-get install` without prior `apt-get update`.
This saves ~50Mb for vyos-build image: 2.04Gb -> 1.99Gb
And ~19Mb for vyos image: 155Mb -> 136Mb
Docker stores all files created in each layer so
command
```
RUN wget -O /tmp/open-vmdk-master.zip https://github.com/.../master.zip && \
unzip -d /tmp/ /tmp/open-vmdk-master.zip && \
cd /tmp/open-vmdk-master/ && make && make install
```
will store open-vmdk-master.zip and /tmp/open-vmdk-master
in the image even though there is a cleanup command later:
```
RUN rm -rf /tmp/*
```
The cleanup command just makes these files invisible in last layer.
So temporary file must be removed in same RUN command
not to be stored in the image.
This commit adds such removals.
Instead of trying to fix - what we call - "Schroedingers build environment"
in this container, we should rather fix the Makefiles of the individual
project using OCaml code.
libvyosconfig is both a build and a run dependency of vyos-1x.
Satisfying the build dependency within the Docker image requires
coordination of updates to vyos-build/libvyosconfig/vyos-1x on any
changes to the library; simplify this process by moving the build to a
step of the vyos-1x Makefile.
Rise upper limit for UID when working in an Active Direcotry integrated
environment. This solves the warning: vyos_bld's uid 1632000007 outside of the
UID_MIN 1000 and UID_MAX 60000 range.
This fixes the sysctl dependency
```
======================================================================
ERROR: test_sysctl_read (test_utils.TestVyOSUtils.test_sysctl_read)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/vyos/work/tmp/vyos-1x/src/tests/test_utils.py", line 28, in test_sysctl_read
self.assertEqual(sysctl_read('net.ipv4.conf.lo.forwarding'), '1')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/vyos/work/tmp/vyos-1x/python/vyos/utils/system.py", line 28, in sysctl_read
tmp = run(['sysctl', '-nb', name], capture_output=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'sysctl'
```