sixeyed / dockerfiles-windows Goto Github PK
View Code? Open in Web Editor NEWDockerfiles for Windows containers
License: MIT License
Dockerfiles for Windows containers
License: MIT License
netfx-4.5.2 Dockerfile raise this error:
Install-Package : No match was found for the specified search criteria and
package name 'microsoft-build-tools'. Try Get-PackageSource to see all
available registered package sources.
The command
docker container run -p 9200:9200 -p 9300:9300 --name elasticsearch sixeyed/elasticsearch:latest
fails with error
'".\bin\elasticsearch.bat"' is not recognized as an internal or external command,
operable program or batch file.
workaround:
docker container run -p 9200:9200 -p 9300:9300 --name elasticsearch --memory 2G sixeyed/elasticsearch:latest .\bin\elasticsearch.bat
Windows 10 pro
Version 1903
OS build 18362.535
Docker Desktop 2.1.0.5(40693)
Engine: 19.03.5
PSVersion 5.1.18362.145
I tried to work nginx with nanoserver1809, but without success...
Do you have any idea how to make the Nginx work on the nanoserver?
I've been trying to update the elasticsearch docker file to use es-5.5.1
Unfortunately some change to log4j is tripping over the windows codepage (see below). log4j 2.8.1 should have a fix but I see es-5.5 use 2.8.2.
I've tried many things with both windowscore and nanoserver but to no avail.
I'm hoping that someone will "just know" what the magic incantation might be?
Thanks in advance
2017-07-29 19:36:23,185 main ERROR Unable to inject fields into builder class for plugin type class org.apache.logging.l
og4j.core.appender.ConsoleAppender, element Console. java.nio.charset.UnsupportedCharsetException: cp65001
at java.nio.charset.Charset.forName(Charset.java:531)
at org.apache.logging.log4j.util.PropertiesUtil.getCharsetProperty(PropertiesUtil.java:146)
at org.apache.logging.log4j.util.PropertiesUtil.getCharsetProperty(PropertiesUtil.java:134)
at org.apache.logging.log4j.core.appender.ConsoleAppender$Target.getCharset(ConsoleAppender.java:85)
at org.apache.logging.log4j.core.appender.ConsoleAppender$Target$1.getDefaultCharset(ConsoleAppender.java:71)
at org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.build(ConsoleAppender.java:218)
at org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.build(ConsoleAppender.java:185)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892
)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884
)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:261)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:166)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:122)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:316)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
at org.elasticsearch.cli.Command.main(Command.java:88)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)
2017-07-29 19:36:23,200 main ERROR Unable to invoke factory method in class class org.apache.logging.log4j.core.appender
.ConsoleAppender for element Console. java.lang.IllegalStateException: No factory method found for class org.apache.logg
ing.log4j.core.appender.ConsoleAppender
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:224)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:130)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892
)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884
)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:261)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:166)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:122)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:316)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
at org.elasticsearch.cli.Command.main(Command.java:88)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)
2017-07-29 19:36:23,200 main ERROR Null object returned for Console in Appenders.
2017-07-29 19:36:23,200 main ERROR Unable to locate appender "STDOUT" for logger config "root"
Hello guys,
Please help me,
I have built an image windows server core with a windows service inside.
I have set (-StartupType Automatic) to that service, but when the container is online, the service doesn't start.
Here is the command in Dockerfile
New-Service -Name $service_name -DisplayName $service_display_name -Description 'Domain Handlers' -BinaryPathName $service_path -StartupType Automatic
and here is the status of that service I got from the running container.
ExitCode : 0
Name : Project-Dev
ProcessId : 0
StartMode : Auto
State : Stopped
Status : OK
I also have two solutions for now.
First, I think I can make a script and set it runs in ENDTRYPOINT or CMD, that script will start the service when the container is online.
Second, I saw that the service is running under localsystem permission and have heard about LocalService and NetworkService, so the question is if my service runs under Localservice or networkservice, then It can auto start? (I thought about the permission, maybe the service can't start because of the permission)
So, please help me to get out of these stuffs
Hi Elton,
Github terminated yesterday the support for TLS 1.1 ( https://github.com/blog/2507-weak-cryptographic-standards-removed )
All dockerfiles that do a Invoke-Webrequest from Github will fail on windows 2016.
I added the following to my scripts to solve this:
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest ...
Alain
Hi, thanks for all your work on the docker image above!
In the readme above you talk about the JVM memory allocation issue with windows 10, is there a way to set this flag (--memory) using docker-compose or in the docker file or is this only a docker run option?
Nuget 3.5.0 is not compatible with MSBuild 15.0 and fails to locate the msbuild.exe. Nuget 4.1.0 is the earliest version, I believe, that is compatible with MSBuild 15.0.
After building the dockerfile dockerfiles-windows/msbuild/netfx-4.7.1-webdeploy/Dockerfile
using it to build an asp.net application does not work.
It seems that
Start-Process vs_BuildTools.exe -ArgumentList '--add', 'Microsoft.VisualStudio.Workload.WebBuildTools', '--quiet', '--norestart', '--nocache' -NoNewWindow -Wait;
doesn't install the webbuild tools workload onto the container.
If I use the base image microsoft/dotnet-framework
and install all of the workloads it seems to work. If I use the microsoft/dotnet-framework-build
the web workload doesn't seem to get installed but there is no error
Hi @sixeyed
I am trying your https://github.com/sixeyed/dockerfiles-windows/blob/master/erlang/nanoserver/sac2016/Dockerfile and after successul build the docker image, in container notice that
PS C:\erlang\erts-10.1\bin> .\erl.exe
Unable to load emulator DLL
(C:\erlang\erts-10.1\bin\beam.smp.dll)
therefore when use erlang nanoserver base image to create rabbitmq nanoserver image will also have the above issue when start rabbitmq. Any ideas for this?
Hi,
in the latest versions of nano, such as microsoft/nanoserver:1709 and Microsoft/powershell:nanoserver the account used by Docker is no longer admin. So it is not possible to modify HKLM
anymore, and therefore not possible to create the G:
alias.
My attempts are with the ElasticSearch image (my actual goal is to create a 1709 image of Nexus, which uses Elasticsearch, so I start with your dockerfile - but in all cases, your dockerfile will no longer work as soon as the OpenJDK project updates its nano image).
I have tried to map the G: drive in the the Dockerfile (VOLUME G:
) - it actually works, but ES still exploses on sun.nio.fs.WindowsLinkSupport.getFinalPath
as was the case before your hack came up. So I guess it is not a "true" fixed drive - [System.IO.DriveInfo]::getdrives()
reports it as a network drive, which is quite surprising.
I have also tried to find a non-admin way of creating the alias, to no avail (no corresponding key in HKCU, no subst command in nano that could be run on each startup...). Also, haven't tried, copy subst.exe into the image and run it before the start command... would be a license issue anyway.
The only way I currently see is to docker exec into the image, make the change and commit to create an image from the container... (docker container exec -i -t -u ContainerAdministrator xxxxx cmd /C REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices" /v "G:" /t REG_SZ /d '\??\C:\data'
) Truly ugly, but it works OK. I'm however looking for a pure Dockerfile solution.
Would you have a workaround for the workaround?
Thanks,
Marc
thx so much for your @sixeyed Dockerfiles!
I was able now to setup Kibana on Windows Server 2019 Datacenter running Docker 19.03.5!
referencing the ltsc2019 AS installer
in line 30 there is a typo, it needs to be:
# COPY --from=downloader C:\kibana\ .
COPY --from=installer C:\kibana\ .
using another kibana version, which matches your elasticsearch (6.4.3 in my case), you need to check the download links, and check if they match the Dockerfile created links:
x86
with x86_64
in your Dockerfile
Hi,
I am trying to run elasticSearch base on windowsServerCore and i am using the same docker file that you have given here.
The build command is running successfully, but when I try to run a container based on this build, I get following error each time:
Error occurred during initialization of VM.
Could not reserve enough space for object heap.
Any inputs here?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.