Skip to content

Commit

Permalink
Fixed alpine 3.6 builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Jun 6, 2017
1 parent 3ab6423 commit ac73a49
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ RUN \

# Install noVNC.
RUN \
apk --no-cache add --virtual build-dependencies curl nodejs && \
NODEJS_NPM=$(apk -q --no-cache search nodejs-npm) && \
apk --no-cache add --virtual build-dependencies curl ${NODEJS_NPM:-nodejs} && \
mkdir noVNC && \
curl -sS -L ${NOVNC_URL} | tar -xz --strip 1 -C noVNC && \
mkdir -p /opt/novnc/include && \
Expand Down Expand Up @@ -170,7 +171,8 @@ RUN sed -i "s/UNIQUE_VERSION/$(date | md5sum | cut -c1-10)/g" /opt/novnc/index.v

# Minify noVNC UI JS files
RUN \
apk --no-cache add --virtual build-dependencies nodejs && \
NODEJS_NPM=$(apk -q --no-cache search nodejs-npm) && \
apk --no-cache add --virtual build-dependencies ${NODEJS_NPM:-nodejs} && \
NOVNC_UI="\
/opt/novnc/app/modulemgr.js \
/opt/novnc/app/ui.js \
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile.alpine-glibc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ RUN \

# Install noVNC.
RUN \
apk --no-cache add --virtual build-dependencies curl nodejs && \
NODEJS_NPM=$(apk -q --no-cache search nodejs-npm) && \
apk --no-cache add --virtual build-dependencies curl ${NODEJS_NPM:-nodejs} && \
mkdir noVNC && \
curl -sS -L ${NOVNC_URL} | tar -xz --strip 1 -C noVNC && \
mkdir -p /opt/novnc/include && \
Expand All @@ -178,7 +179,7 @@ RUN \
./node_modules/uglify-js/bin/uglifyjs \
--compress --mangle --source-map \
--output /opt/novnc/js/novnc-core.min.js -- $NOVNC_CORE && \
npm uninstall uglify-js && \
npm uninstall uglify-js source-map && \
sed -i "s/noVNC-${NOVNC_VERSION}//g" /opt/novnc/js/novnc-core.min.js.map && \
echo -e "\n//# sourceMappingURL=/js/novnc-core.min.js.map" >> /opt/novnc/js/novnc-core.min.js && \
# Install Bootstrap
Expand Down Expand Up @@ -206,7 +207,8 @@ RUN sed -i "s/UNIQUE_VERSION/$(date | md5sum | cut -c1-10)/g" /opt/novnc/index.v

# Minify noVNC UI JS files
RUN \
apk --no-cache add --virtual build-dependencies nodejs && \
NODEJS_NPM=$(apk -q --no-cache search nodejs-npm) && \
apk --no-cache add --virtual build-dependencies ${NODEJS_NPM:-nodejs} && \
NOVNC_UI="\
/opt/novnc/app/modulemgr.js \
/opt/novnc/app/ui.js \
Expand Down
6 changes: 5 additions & 1 deletion rootfs/opt/install_app_icon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ Options:
}

install_build_dependencies_alpine() {
apk --no-cache add --virtual build-dependencies curl nodejs jq sed
# In alpine 3.5, npm is in nodejs package, while in alpine 3.6 it's in
# nodejs-npm.
NODEJS_NPM=$(apk -q --no-cache search nodejs-npm)
NODEJS_NPM=${NODEJS_NPM:-nodejs}
apk --no-cache add --virtual build-dependencies curl $NODEJS_NPM jq sed
}

install_build_dependencies_debian() {
Expand Down

0 comments on commit ac73a49

Please sign in to comment.