mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-30 00:49:53 +03:00
[gulp] Update docker for static version
This commit is contained in:
parent
97b63eda33
commit
d5f1ca7951
2 changed files with 14 additions and 37 deletions
|
@ -12,43 +12,15 @@
|
|||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
FROM node:slim
|
||||
FROM nginx
|
||||
|
||||
MAINTAINER Jones MAGLOIRE @Joxit
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
WORKDIR /usr/share/nginx/html/
|
||||
|
||||
RUN npm install -g http-server && npm cache clean
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
COPY dist/scripts/script-static.js /usr/share/nginx/html/scripts/script.js
|
||||
COPY dist/scripts/tags-static.js /usr/share/nginx/html/scripts/tags.js
|
||||
COPY bin/entrypoint /bin
|
||||
|
||||
COPY package.json /usr/src/app
|
||||
|
||||
RUN npm install \
|
||||
&& find node_modules/ \
|
||||
-maxdepth 1 -mindepth 1 -type d \
|
||||
! -name riot \
|
||||
! -name material-design-icons \
|
||||
! -name material-design-* \
|
||||
! -name dialog-polyfill \
|
||||
! -name riotgear-router \
|
||||
-exec rm -rf {} \; \
|
||||
&& find node_modules/material-design-* \
|
||||
-maxdepth 1 -mindepth 1 \
|
||||
! -name package.json \
|
||||
! -name iconfont \
|
||||
! -name LICENSE \
|
||||
! -name material* \
|
||||
! -name dist \
|
||||
-exec rm -rf {} \; \
|
||||
&& find node_modules/material-design-lite/dist/ -maxdepth 1 -mindepth 1 \
|
||||
! -name "*.js*" \
|
||||
! -name "*.css*" \
|
||||
-exec rm -rf {} \; \
|
||||
&& npm cache clean
|
||||
|
||||
COPY . /usr/src/app
|
||||
COPY static/*.* /usr/src/app/
|
||||
COPY static/entrypoint /bin
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT entrypoint
|
||||
ENTRYPOINT entrypoint
|
|
@ -1,4 +1,9 @@
|
|||
#!/bin/bash
|
||||
sed -i "s,\${URL},${URL}," script.js
|
||||
$@
|
||||
sed -i "s,\${URL},${URL}," scripts/script.js
|
||||
|
||||
http-server $@
|
||||
if [ -z "$@" ]; then
|
||||
nginx -g "daemon off;"
|
||||
else
|
||||
$@
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue