Fix heat-container-agent image building error on arm64

Fix bellow building error on arm64.
----------
  build/temp.linux-aarch64-3.8/_openssl.c:498:10: fatal error: openssl/opensslv.h: No such file or directory
    498 | #include <openssl/opensslv.h>
        |          ^~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for cryptography
  Running setup.py clean for cryptography
  Failed to build cryptography
  ERROR: Could not build wheels for cryptography
  which use PEP 517 and cannot be installed directly
----------

Additionally, add an ARCH ARG to pass other architecure value when
building image.
E.g: $ docker build --build-arg ARCH=`uname -m` -t TAGNAME .

task: 37823
story: 2007026

Change-Id: I7f62b882fa812beb74e38bbc5916d9df5afbd481
This commit is contained in:
Xinliang Liu 2019-12-17 03:34:21 +00:00
parent d4a4019ed3
commit 36cb39110a

View File

@ -1,5 +1,7 @@
FROM fedora:rawhide FROM fedora:rawhide
ARG ARCH=x86_64
# Fill out the labels # Fill out the labels
LABEL name="heat-container-agent" \ LABEL name="heat-container-agent" \
maintainer="Spyros Trigazis <strigazi@gmail.com>" \ maintainer="Spyros Trigazis <strigazi@gmail.com>" \
@ -7,7 +9,7 @@ LABEL name="heat-container-agent" \
summary="Heat Container Agent system image" \ summary="Heat Container Agent system image" \
version="1.0" \ version="1.0" \
help="No help" \ help="No help" \
architecture="x86_64" \ architecture=$ARCH \
atomic.type="system" \ atomic.type="system" \
distribution-scope="public" distribution-scope="public"
@ -19,6 +21,7 @@ RUN dnf -y --setopt=tsflags=nodocs --nogpgcheck install \
libffi-devel \ libffi-devel \
openssh-clients \ openssh-clients \
openssl \ openssl \
openssl-devel \
python-devel \ python-devel \
python-lxml \ python-lxml \
python-pip \ python-pip \