Unable to locate package libqt4-dev on Docker - ruby

My Docker started to give this message when I'm trying to build
Unable to locate package libqt4-dev

Related

Linux Package installation in Kubernetes pods

I am running airflow pods and I am facing issue with installing package in pod
When I exec into a pod, I cannot run the following command
ps aux | grep airflow
Then
I used
apt-get update && apt-get install procps
but it is throwing this error
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
Any ideas to resolve this?
Thanks
To use apt-get in linux, you need the root access, and almost all the airflow images create a new user to remove this access from the docker image in order to avoid the problems, so to solve this problem, you can create a custom image and install whatever you need.
Assume you are using the official docker image apache/airflow
FROM apache/airflow
USER root
RUN apt-get update && apt-get install procps
USER airflow
Then you need to build the image to use it directly if you are working in localhost, or to push it to a docker registry (docker hub for ex), then configure your server to use it.

docker-compose not working in Windows powershell

I am trying to run the docker docker-compose build command in Windows but it isn't running. I get the following error.
[+] Building 0.0s (0/0)
error during connect: This error may indicate that the docker daemon is not running.: Get "http://%!F(MISSING)%!F(MISSING).%!F(MISSING)pipe%!F(MISSING)docker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.: driver not connecting
My docker-compose version is v2.5.0 but it doesn't let me run the build command. I even installed Docker for Windows and it only shows me the following issue.
Not sure how to proceed with this.

Run docker container with open62541 server on Raspberry Pi

Description
I am connected to my raspberry pi 1 ( via putty and I have already followed the steps as described here at "Building Debian Packages inside Docker Container with CMake on Ubuntu or Debian"
I have cloned the docker-deb-builder repo and build both the dockerfile-ubuntu-18.04 and
dockerfile-ubuntu-17.04.
Then, I have cloned the open62541 repo and checked out pack/1.0.
Afterwards, I have created the output folder in the docker-deb-builder folder and tried to run the
following command in the development folder:
./build -i docker-deb-builder:18.04 -o output ~/ma/development/open62541
But it fails with following error message:
pi#raspberrypi:~/ma/dockerVersion/docker-deb-builder $ sudo ./build -i docker-deb-builder:18.04 -o output ~/ma/dockerVersion/open62541
Running docker:
docker run -it -it -v /home/pi/ma/development/open62541:/source-ro:ro -v /home/pi/ma/development/docker-deb-builder/output:/output -v /home/pi/ma/development/docker-deb-builder/build-helper.sh:/build-helper.sh:ro -e USER=0 -e GROUP=0 --rm docker-deb-builder:18.04 /build-helper.sh
Unable to find image 'docker-deb-builder:18.04' locally
docker: Error response from daemon: pull access denied for docker-deb-builder, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
What I am trying to accomplish is to run a docker container (with an open62541 server running in it) on my raspberry pi.
Questions:
- How can I solve the problem described above?
- How or where can I integrate my customized open62541 server code?
Background Information / Reproduction Steps
Running the command cat /etc/os-release gives me the following information:
pi#raspberrypi:~/ma/dockerVersion/docker-deb-builder $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Issue 1 - running a container by tag (but not finding it by tag)
Firstly, the error docker: Error response from daemon: pull access denied for docker-deb-builder occurs when you docker run using a image name that cannot be found locally, so it goes off and tries to find docker-deb-builder on hub.docker.com (publicly) and if you go look there are none with that exact name.
The error is basically telling you;
I couldn't find docker-deb-builder locally
I couldn't find docker-deb-builder on hub.docker.com (public)
I want to try hub.docker.com (private) but you are not logged in
So you might first try to build the container and docker tag it with docker-deb-builder so you can then find it locally with the command you provided in this issue.
Issue 2 - building on armv7 (raspberry pi)
The page you linked to has instructions for;
git clone https://github.com/tsaarni/docker-deb-builder.git
Looking at tsaarni/docker-deb-builder on github for the 18.04 image you're targetting i found the Docekrfile and it is using ubuntu:18.04 and you will need to modify this to use ubuntu:18.04#sha256:60a99a670b980963e4a9d882f631cba5d26ba5d14ccba2aa82a4e1f4d084fb1f which is the signature for the armv7.
Might just add, to make sure in case you're not aware, to run on armv7 you must also docker build it on armv7

Build Hyperledger Fabric with Docker on Mac

I'm trying to build Hyperledger Fabric images with Docker on Mac.
I installed prerequisites and git cloned fabric 1.4 and fabric-ca 1.4.
and I typed make docker inside of fabric directory.
When I did same on unbuntu virtual box, it had no problem.
However, I got error on Mac.(Mac Mojave 10.14.3)
Error log:
Building docker peer-image
docker build -t hyperledger/fabric-peer .build/image/peer
Sending build context to Docker daemon 33.35MB
Step 1/7 : FROM hyperledger/fabric-baseos:amd64-0.4.14 --->
75f5fb1a0e0c
Step 2/7 : ENV FABRIC_CFG_PATH /etc/hyperledger/fabric ---> Using cache
---> 07fffab66f6c
Step 3/7 : RUN mkdir -p /var/hyperledger/production $FABRIC_CFG_PATH
---> Using cache
---> 12db028c5850
Step 4/7 : COPY payload/peer /usr/local/bin
---> Using cache
---> 1182063498b1
Step 5/7 : ADD payload/sampleconfig.tar.bz2 $FABRIC_CFG_PATH
failed to copy files: Error processing tar file(bzip2 data invalid: bad
magic value in continuation file):
make: *** [.build/image/peer/.dummy-amd64-1.4.1-snapshot-348c677c1]
Error 1
I searched every web sites, but I cannot solve it.
Is there anyone know about this error ? I already tried: brew install gnu-tar --with-default-names and brew install lib tool.
brew install gnu-tar
brew install libtool
export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"

rvm-exec: not found while building docker

I have ruby application running inside docker.I tried to run docker container on ubuntu VM which worked fine.But when I tried to run the same docker-ruby application on another VM ,it is giving me error as-
Step 14/17 : RUN bundle install --gemfile test/Gemfile
---> Running in b545e371e3
/usr/bin/bundle: 2: exec: /usr/local/rvm/bin/rvm-exec: not found
ERROR: Service 'test' failed to build: The command '/bin/sh -c bundle install --gemfile test/Gemfile' returned a non-zero code: 127
I'm using same repository and ruby version(1.8.7) on both ubuntu systems, still facing issue.Can anyone help/suggest some solution on this issue? Thanks in advance.

Resources