Dockerfile installing multiple msi

拈花ヽ惹草 提交于 2019-12-13 03:38:08

问题


I would like install the following programs to the Windows 10 as a server and hence my maven string boot project afterwards.

Git (windows 64 bit) Version:   2.16.2  
Java SE Development Kit (windows 64 bit)    Version: 8u201  
Open JDK (windows 64 bit)   Version: 11.0.2 
Apache Maven    Version: 3.6.1  
Eclipse 2019-03 (windows 64 bit)    Version: 4.11.0 
Lombok   Version: 1.18.6    

When it comes to the configuration, I find out the samples that only installing one software to configure instead of multiple. As a dev-ops operator, Would you please tell me how to prepare the installation steps for multiple msi such as I can install the above components in one DockerFile?

Here is my DockerFile work in-progress :

FROM openjdk:8-jre-alpine
WORKDIR /code 


FROM mcr.microsoft.com/windows/servercore:1803 as installer

ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 8.11.0
ENV NODE_SHA256 7b2409605c871a40d60c187bd24f6f6ddf10590df060b7d905ef46b3b3aa7f81

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';$ProgressPreference='silentlyContinue';"]

RUN Invoke-WebRequest -OutFile nodejs.zip -UseBasicParsing "https://nodejs.org/dist/v8.11.0/node-v8.11.0-win-x64.zip";
Expand-Archive nodejs.zip -DestinationPath C:\; 
Rename-Item "C:\\node-v8.11.0-win-x64" c:\nodejs

FROM mcr.microsoft.com/windows/nanoserver:1803

回答1:


did you make any progress on this? You may need some \ to indicate new line but part of the same RUN command:

RUN Invoke-WebRequest -OutFile nodejs.zip -UseBasicParsing "https://nodejs.org/dist/v8.11.0/node-v8.11.0-win-x64.zip"; \

Expand-Archive nodejs.zip -DestinationPath C:\; \

Rename-Item "C:\node-v8.11.0-win-x64" c:\nodejs



来源:https://stackoverflow.com/questions/58296461/dockerfile-installing-multiple-msi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!