David K. Bainbridge | da61772 | 2018-01-29 09:54:40 -0800 | [diff] [blame] | 1 | # Copyright 2018 the original author or authors. |
| 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 | FROM ${REGISTRY}portainer/portainer:1.15.2 as base |
| 16 | |
| 17 | FROM ${REGISTRY}alpine:3.6 as work |
| 18 | COPY --from=base / /work |
| 19 | RUN find /work -print |
| 20 | |
| 21 | RUN sed -i \ |
| 22 | -e 's~constant("DOCKER_ENDPOINT","api/docker")~constant("DOCKER_ENDPOINT","docker/api/docker")~' \ |
| 23 | -e 's~constant("CONFIG_ENDPOINT","api/settings")~constant("CONFIG_ENDPOINT","docker/api/settings")~' \ |
| 24 | -e 's~constant("AUTH_ENDPOINT","api/auth")~constant("AUTH_ENDPOINT","docker/api/auth")~' \ |
| 25 | -e 's~constant("USERS_ENDPOINT","api/users")~constant("USERS_ENDPOINT","docker/api/users")~' \ |
| 26 | -e 's~constant("ENDPOINTS_ENDPOINT","api/endpoints")~constant("ENDPOINTS_ENDPOINT","docker/api/endpoints")~' \ |
| 27 | -e 's~constant("TEMPLATES_ENDPOINT","api/templates")~constant("TEMPLATES_ENDPOINT","docker/api/templates")~' \ |
| 28 | /work/public/js/app.*.js |
| 29 | |
| 30 | RUN sed -i \ |
| 31 | -e 's~href="~href="docker/~' \ |
| 32 | -e 's~href='\''~href='\''docker/~' \ |
| 33 | -e 's~src="~src="docker/~' \ |
| 34 | -e 's~src='\''~src='\''docker/~' \ |
| 35 | -e 's~"images/logo.png"~"docker/images/logo.png"~' \ |
| 36 | /work/public/index.html |
| 37 | |
| 38 | FROM centurylink/ca-certs |
| 39 | MAINTAINER Voltha Community <info@opennetworking.org> |
| 40 | |
| 41 | COPY --from=work /work / |
| 42 | |
| 43 | VOLUME /data |
| 44 | |
| 45 | WORKDIR / |
| 46 | |
| 47 | EXPOSE 9000 |
| 48 | |
| 49 | ENTRYPOINT ["/portainer"] |