Asked  12 Months ago    Answers:  5   Viewed   240 times

I've got a Dockerfile. When building the image, the build fails on this error:

automake: error: no 'Makefile.am' found for any configure output
Error build: The command [/bin/sh -c aclocal && autoconf && automake -a] returned a non-zero code: 1

which in reality is harmless. The library builds fine, but Docker stops the build once it receives this error. Is there any way I can instruct Docker to just ignore this?

 Answers

5

Sure. Docker is just responding to the error codes returned by the RUN shell scripts in the Dockerfile. If your Dockerfile has something like:

RUN make

You could replace that with:

RUN make; exit 0

This will always return a 0 (success) exit code. The disadvantage here is that your image will appear to build successfully even if there are actual errors in the build process.

Tuesday, June 22, 2021
 
Semirix
 
4

You need to point to the directory instead. You must not specify the dockerfile.

docker build -t ubuntu-test:latest . does work.

docker build -t ubuntu-test:latest ./Dockerfile does not work.

Sunday, August 1, 2021
 
ALH
 
ALH
5

Note:The steps provided here are only for Linux, you might be using some other OS then use respective editor and commands

MySQL stores error message file at /usr/share/mysql/english/errmsg.sys where english is the language you want to use.

Note:You need to have super user privileges

Step 1. Take backup of existing errmsg.sys (so that you can revert if some problem occured

  $sudo cp /usr/share/mysql/english/errmsg.sys ~/errmsg.sys.bkp

Step 2. Open /usr/share/mysql/english/errmsg.sys in vi editor.

$sudo vi /usr/share/mysql/english/errmsg.sys

Step 3. Search for "You have an" in errmsg.sys

in vi editor for searching try this way-->  /You have an [press enter]

It will get you to the string "You have an error...." as show in screen-shot

Step 4. Edit that error message as per your need. I've deleted string You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the and kept just right syntax to use

Check below screen-shot.

Step 5. Save and Exit.

in vi editor to save and exit-->   :x! [press enter]     here ! is added to override read-only file

Step 6. Restart mysql service.

$sudo mysql restart

step 7. check error message (I'm checking in phpMyAdmin)

In this answer I've updated error message You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near... similarly you can update other standard error message as well.

Hope it helped ! :D

Thursday, August 12, 2021
 
Freddie
 
4

Let's consider the below Dockerfile

FROM alpine
RUN ifconfig | grep -i hwaddr

If you build it using

docker build .

You get

Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM alpine
 ---> 7328f6f8b418
Step 2/2 : RUN ifconfig | grep -i hwaddr
 ---> Running in c092838dbe31
eth0      Link encap:Ethernet  HWaddr 02:42:AC:11:00:02
Removing intermediate container c092838dbe31
 ---> 7038787f51b8

Now we can't control Mac address of docker build, but we can control the network of build and we can control mac address of a container. So let us launch a container with our mac address

$ docker run --name mac1234deb06b61 --mac-address="12:34:de:b0:6b:61" -d alpine tail -f /dev/null
c3579e4685933b757f51c5f9e36d620dbe3a62abd0e0d6a421b5f1c04045061c

$ docker build --network container:mac1234deb06b61 --no-cache .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM alpine
 ---> 7328f6f8b418
Step 2/2 : RUN ifconfig | grep -i hwaddr
 ---> Running in 4390f13cbe8f
eth0      Link encap:Ethernet  HWaddr 12:34:DE:B0:6B:61
Removing intermediate container 4390f13cbe8f
 ---> b0b5f7321921
Successfully built b0b5f7321921

As you can see, now the docker build takes a updated mac address

Monday, September 27, 2021
 
ErocM
 
4

You can't mount a local directory using commands in a Dockerfile. You must do this with docker run, or a proxy to docker run like docker-compose.

Tuesday, December 14, 2021
 
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :  
Share