RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1533851 - [RFE] docker build command should have "--add-host" option
Summary: [RFE] docker build command should have "--add-host" option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: podman
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Brent Baude
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks: 1186913 1636853
TreeView+ depends on / blocked
 
Reported: 2018-01-12 11:32 UTC by Sayali Kulkarni
Modified: 2020-09-21 16:15 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-31 19:21:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0241 0 None None None 2019-01-31 19:21:30 UTC

Description Sayali Kulkarni 2018-01-12 11:32:42 UTC
Description of problem:

docker build command does not provide --add-host option

Version-Release number of selected component (if applicable):

How reproducible:

Everytime

Additional info:

https://docs.docker.com/edge/engine/reference/commandline/build/

Comment 4 Daniel Walsh 2019-01-02 21:48:01 UTC
Since we are replacing Docker CLI with Podman, we are verifing all RFE to make sure they work with podman.

The current release should have support for this.

Comment 6 Joy Pu 2019-01-17 09:09:32 UTC
Test with podman-0.12.1.2-2.git9551f6b.el7.x86_64 with following Dockerfile
# cat Dockerfile
FROM busybox
COPY hello /hello 
RUN cat /etc/hosts
CMD ["/hello"]


# podman build --format docker --add-host mytest:192.168.1.2 -t test .
STEP 1: FROM busybox
STEP 2: COPY hello /hello 
--> Using cache d8226e44a933e5d5db834961e7fcbd7e9a54fc75fe03105756a2601f6c003472
STEP 3: FROM d8226e44a933e5d5db834961e7fcbd7e9a54fc75fe03105756a2601f6c003472
STEP 4: RUN cat /etc/hosts
ERRO[0000] read container terminal output: input/output error: input/output error 
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.2	mytest
--> bae4dcaa87e3b1a7db73e241b5facc38b0a86183cf06b25e931c13d8a431fe65
STEP 5: FROM bae4dcaa87e3b1a7db73e241b5facc38b0a86183cf06b25e931c13d8a431fe65
STEP 6: CMD ["/hello"]
--> 29365267fd0ed9082ce964dce0defb7c09a85182b1a77ab33ab52ca10c536acf
STEP 7: COMMIT test

So set this to verified.

Comment 8 errata-xmlrpc 2019-01-31 19:21:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0241

Comment 11 Daniel Walsh 2019-09-17 13:24:18 UTC
Docker and Podman have totally different storages.  So you need to copy or push/pull images to a registry to make this work.


Note You need to log in before you can comment on or make changes to this bug.