mirror of
https://github.com/fcwu/docker-ubuntu-vnc-desktop
synced 2025-12-06 16:32:47 +01:00
using a smaller image for the node build and fixing the arm build too
This commit is contained in:
parent
18e3bd4f0d
commit
13c0ac0ea3
3 changed files with 15 additions and 40 deletions
|
|
@ -1 +1,2 @@
|
||||||
web/node_modules
|
web/node_modules
|
||||||
|
.git
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ FROM $image as system
|
||||||
|
|
||||||
ARG localbuild
|
ARG localbuild
|
||||||
RUN echo "LOCALBUILD=$localbuild"
|
RUN echo "LOCALBUILD=$localbuild"
|
||||||
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://'$localbuild'tw.archive.ubuntu.com/#' /etc/apt/sources.list; fi
|
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://'$localbuild'.archive.ubuntu.com/#' /etc/apt/sources.list; fi
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# && add-apt-repository ppa:fcwu-tw/apps x11vnc
|
# && add-apt-repository ppa:fcwu-tw/apps x11vnc
|
||||||
|
|
@ -55,29 +55,13 @@ RUN apt-get update \
|
||||||
################################################################################
|
################################################################################
|
||||||
# builder
|
# builder
|
||||||
################################################################################
|
################################################################################
|
||||||
FROM ubuntu:16.04 as builder
|
FROM node:8-alpine as builder
|
||||||
|
|
||||||
ARG localbuild
|
|
||||||
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://'$localbuild'tw.archive.ubuntu.com/#' /etc/apt/sources.list; fi
|
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends curl ca-certificates
|
|
||||||
|
|
||||||
# nodejs
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
|
|
||||||
&& apt-get install -y nodejs
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
||||||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y yarn
|
|
||||||
|
|
||||||
# build frontend
|
# build frontend
|
||||||
COPY web /src/web
|
COPY web /src/web
|
||||||
RUN cd /src/web \
|
RUN cd /src/web \
|
||||||
&& yarn \
|
&& yarn install \
|
||||||
&& npm run build
|
&& yarn build
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ FROM arm32v7/ubuntu:18.04 as system
|
||||||
|
|
||||||
COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/
|
COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/
|
||||||
ARG localbuild
|
ARG localbuild
|
||||||
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; fi
|
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://'$localbuild'.archive.ubuntu.com/#' /etc/apt/sources.list; fi
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
|
|
@ -25,7 +25,7 @@ RUN apt update \
|
||||||
# install debs error if combine together
|
# install debs error if combine together
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt install -y --no-install-recommends --allow-unauthenticated \
|
&& apt install -y --no-install-recommends --allow-unauthenticated \
|
||||||
lxde xvfb x11vnc \
|
lxqt openbox xvfb x11vnc \
|
||||||
firefox chromium-browser \
|
firefox chromium-browser \
|
||||||
ttf-ubuntu-font-family ttf-wqy-zenhei \
|
ttf-ubuntu-font-family ttf-wqy-zenhei \
|
||||||
&& apt autoclean -y \
|
&& apt autoclean -y \
|
||||||
|
|
@ -66,29 +66,19 @@ RUN apt-get update \
|
||||||
################################################################################
|
################################################################################
|
||||||
# builder
|
# builder
|
||||||
################################################################################
|
################################################################################
|
||||||
FROM ubuntu:18.04 as builder
|
FROM node:8-alpine as builder
|
||||||
|
|
||||||
ARG localbuild
|
|
||||||
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; fi
|
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends curl ca-certificates gnupg
|
|
||||||
|
|
||||||
# nodejs
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
|
|
||||||
&& apt-get install -y nodejs
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
||||||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y yarn
|
|
||||||
|
|
||||||
# build frontend
|
# build frontend
|
||||||
COPY web /src/web
|
COPY web /src/web
|
||||||
RUN cd /src/web \
|
RUN cd /src/web \
|
||||||
&& yarn \
|
&& yarn \
|
||||||
&& npm run build
|
&& yarn run build
|
||||||
|
|
||||||
|
# build frontend
|
||||||
|
COPY web /src/web
|
||||||
|
RUN cd /src/web \
|
||||||
|
&& yarn install \
|
||||||
|
&& yarn build
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue