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"
Related
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.
while attempting to build an image in Docker/macOS, I get the following error:
failed to compute cache key: failed to create hash for
/app-temp/client/dist: operation not supported
My Dockerfile looks like this:
FROM node:lts-alpine as ui-build
WORKDIR /app-temp
COPY client/ ./client/
RUN cd client && npm install
RUN cd client && npm run build
FROM node:lts-alpine as api-build
WORKDIR /app
COPY --from=ui-build /app-temp/client/dist ./client/dist
COPY server/ ./server/
RUN cd server && npm install
EXPOSE 3000
CMD ["node", "/app/server/src/index.js"]
And the docker command that I am using is:
docker build -t test-image .
Now, note that the image is successfully built in a Linux machine. However, the above-mentioned error persists in a macOS machine.
I am running macOS Big Sur 11.2.1.
Any ideas as to how solve this problem?
Thanks in advance.
just in case someone else finds himself here
Look in your .dockerignore file if dist is in the list
Also, try building with BUILDKIT disabled
DOCKER_BUILDKIT=0 docker build ....
Im gonna throw my solution out there.
Setup: .net 5 web app with docker enabled, contains a dockerfile that was created by visual studio.
There was a step where the docker file was saying to copy my csproj up to the parent folder. I edited the source directory to from parent/myproject.csproj to myproject.csproj then I ran docker build and it worked.
Im assuming that when I run docker build I was down one level in the child folder where the dockerfile lives, and the paths just werent lining up.
I am fairly new to docker containers and images. I am trying to make a Dockerfile with ubuntu 18.04 and another docker image from http://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#docker tool.
Later, I want to generate a docker container for the above-linked tool as a base image and ubuntu as the parent image makefile. For example, here is how you will do it via command line for the installation of the image for the tool within ubuntu os.
docker pull ensemblorg/ensembl-vep
docker run -t -i ensemblorg/ensembl-vep ./vep
When I try to install the Ubuntu:18.04 and the above docker image via make file it says
docker build -t "KM:vep-96.0" .
Sending build context to Docker daemon 4.608kB
Step 1/4 : FROM ubuntu:18.04
18.04: Pulling from library/ubuntu
5bed26d33875: Pull complete
f11b29a9c730: Pull complete
930bda195c84: Pull complete
78bf9a5ad49e: Pull complete
Digest: sha256:bec5a2727be7fff3d308193cfde3491f8fba1a2ba392b7546b43a051853a341d
Status: Downloaded newer image for ubuntu:18.04
---> 4e5021d210f6
Step 2/4 : MAINTAINER ARJ
---> Running in 8f1f7e837703
Removing intermediate container 8f1f7e837703
---> 511205d197d6
Step 3/4 : RUN pull ensemblorg/ensembl-vep
---> Running in b584b3b1738c
/bin/sh: 1: pull: not found
The command '/bin/sh -c pull ensemblorg/ensembl-vep' returned a non-zero code: 127
Makefile:5: recipe for target 'docker-build' failed
make: *** [docker-build] Error 127
Here is how my Dockerfile looks like,
# NGS580 container for making reports with R 3.4.3
FROM ubuntu:18.04
MAINTAINER ARJ
# ~~~~~ VEP ~~~~~ #
FROM pull ensemblorg/ensembl-vep
run -t -i ensemblorg/ensembl-vep ./vep
I would like to know whether or not it is possible to have another docker image within a Dockerfile? If not how can I have the tool without needing to install a lot of modules? Any suggestions or help would be much appreciated.
Thank You!
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
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.