############################################################################## # Copyright (c) 2017 Dell EMC and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## # Docker container for StorPerf HTTP Front ENd # # Build: # $ docker build -t opnfv/storperf-swaggerui:tag . ## ARG ARCH=x86_64 ARG ALPINE_VERSION=v3.6 FROM node:10-alpine RUN ulimit -n 1024 # This is from https://github.com/schickling/dockerfiles/blob/master/swagger-ui/Dockerfile MAINTAINER Johannes Schickling "schickling.j@gmail.com" ENV VERSION "v2.2.10" ENV FOLDER "swagger-ui-2.2.10" ENV API_URL "http://petstore.swagger.io/v2/swagger.json" ENV API_KEY "**None**" ENV OAUTH_CLIENT_ID "**None**" ENV OAUTH_CLIENT_SECRET "**None**" ENV OAUTH_REALM "**None**" ENV OAUTH_APP_NAME "**None**" ENV OAUTH_ADDITIONAL_PARAMS "**None**" ENV SWAGGER_JSON "/app/swagger.json" ENV PORT 80 WORKDIR /app RUN apk add --no-cache openssl curl RUN curl -SL https://github.com/swagger-api/swagger-ui/archive/$VERSION.tar.gz | tar xvz RUN cp -r $FOLDER/dist/* . && rm -rf $FOLDER RUN npm config set unsafe-perm true RUN npm install -g http-server RUN apk del openssl ADD run.sh run.sh # webserver port EXPOSE 80 CMD ["sh", "run.sh"]