mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-27 23:50:01 +03:00
[docker-multi-stage] Add multi-stage-build for alpine version
This commit is contained in:
parent
1e185b4034
commit
89e2782751
3 changed files with 31 additions and 4 deletions
|
@ -1,4 +1,7 @@
|
||||||
*
|
*
|
||||||
!dist
|
!dist
|
||||||
!bin
|
!bin
|
||||||
!nginx
|
!nginx
|
||||||
|
!src
|
||||||
|
!package.json
|
||||||
|
!gulpfile.js
|
14
Dockerfile
14
Dockerfile
|
@ -12,10 +12,22 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
FROM node:10-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /usr/app
|
||||||
|
|
||||||
|
COPY package.json .
|
||||||
|
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
LABEL maintainer="Jones MAGLOIRE @Joxit"
|
LABEL maintainer="Jones MAGLOIRE @Joxit"
|
||||||
|
|
||||||
WORKDIR /usr/share/nginx/html/
|
WORKDIR /usr/share/nginx/html/
|
||||||
|
|
||||||
COPY dist/ /usr/share/nginx/html/
|
COPY --from=builder /usr/app/dist/ /usr/share/nginx/html/
|
|
@ -12,6 +12,18 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
FROM node:10-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /usr/app
|
||||||
|
|
||||||
|
COPY package.json .
|
||||||
|
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
LABEL maintainer="Jones MAGLOIRE @Joxit"
|
LABEL maintainer="Jones MAGLOIRE @Joxit"
|
||||||
|
@ -19,8 +31,8 @@ LABEL maintainer="Jones MAGLOIRE @Joxit"
|
||||||
WORKDIR /usr/share/nginx/html/
|
WORKDIR /usr/share/nginx/html/
|
||||||
|
|
||||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY dist/ /usr/share/nginx/html/
|
COPY --from=builder /usr/app/dist/ /usr/share/nginx/html/
|
||||||
COPY dist/scripts/docker-registry-ui-static.js /usr/share/nginx/html/scripts/docker-registry-ui.js
|
COPY --from=builder /usr/app/dist/scripts/docker-registry-ui-static.js /usr/share/nginx/html/scripts/docker-registry-ui.js
|
||||||
COPY bin/entrypoint /bin
|
COPY bin/entrypoint /bin
|
||||||
|
|
||||||
ENTRYPOINT entrypoint
|
ENTRYPOINT entrypoint
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue