|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +# Turn .dockerignore to .dockerallow by excluding everything and explicitly |
| 19 | +# allowing specific files and directories. This enables us to quickly add |
| 20 | +# dependency files to the docker content without scanning the whole directory. |
| 21 | +# This setup requires to all of our docker containers have arrow's source |
| 22 | +# as a mounted directory. |
| 23 | + |
| 24 | +FROM node:14.16.0-alpine as build |
| 25 | +WORKDIR /app |
| 26 | +ENV PATH /app/node_modules/.bin:$PATH |
| 27 | + |
| 28 | +COPY package.json ./ |
| 29 | +COPY yarn.lock ./ |
| 30 | +RUN yarn |
| 31 | + |
| 32 | +COPY . ./ |
| 33 | +RUN yarn build |
| 34 | + |
| 35 | +FROM nginx:stable-alpine |
| 36 | +COPY --from=build /app/build /usr/share/nginx/html |
| 37 | +EXPOSE 80 |
| 38 | +CMD ["nginx", "-g", "daemon off;"] |
0 commit comments