github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-supply-chain-master/fish_client/Dockerfile-installed (about)

     1  # Copyright 2017 Intel Corporation
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  # -----------------------------------------------------------------------------
    15  
    16  FROM node:8 AS static_builder
    17  
    18  WORKDIR /supply_chain/fish_client
    19  COPY fish_client/package.json .
    20  RUN npm install
    21  
    22  COPY protos/ ../protos/
    23  COPY fish_client/ .
    24  RUN npm run build
    25  
    26  FROM httpd:2.4
    27  
    28  COPY --from=static_builder /supply_chain/fish_client/public/ /usr/local/apache2/htdocs/
    29  
    30  RUN echo "\
    31  \n\
    32  ServerName fish_client\n\
    33  AddDefaultCharset utf-8\n\
    34  LoadModule proxy_module modules/mod_proxy.so\n\
    35  LoadModule proxy_http_module modules/mod_proxy_http.so\n\
    36  ProxyPass /api http://server:3000\n\
    37  ProxyPassReverse /api http://server:3000\n\
    38  \n\
    39  " >>/usr/local/apache2/conf/httpd.conf
    40  
    41  EXPOSE 80/tcp