blob: ec69bfad9401c22c470dd4092b3364b467e006ae [file] [log] [blame]
David K. Bainbridgeda617722018-01-29 09:54:40 -08001# 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
15FROM ${REGISTRY}portainer/portainer:1.15.2 as base
16
17FROM ${REGISTRY}alpine:3.6 as work
18COPY --from=base / /work
19RUN find /work -print
20
21RUN 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
30RUN 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
38FROM centurylink/ca-certs
39MAINTAINER Voltha Community <info@opennetworking.org>
40
41COPY --from=work /work /
42
43VOLUME /data
44
45WORKDIR /
46
47EXPOSE 9000
48
49ENTRYPOINT ["/portainer"]