-
Notifications
You must be signed in to change notification settings - Fork 351
/
Dockerfile
39 lines (30 loc) · 1.89 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# AUTOMATICALLY GENERATED
# DO NOT EDIT THIS FILE DIRECTLY, USE /Dockerfile.template.erb
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019
LABEL maintainer "Fluentd developers <fluentd@googlegroups.com>"
LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.18.0"
# Do not split this into multiple RUN!
# Docker creates a layer for every RUN-Statement
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"
# NOTE: For avoiding stalling with docker build on windows, we must use latest version of msys2.
RUN choco install -y ruby --version 3.2.6.1 --params "'/InstallDir:C:\ruby32'" \
&& choco install -y msys2 --version 20240727.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby32\msys64'"
RUN refreshenv \
&& ridk install 3 \
&& type "c:\ProgramData\gemrc" \
&& c:\ruby32\bin\ruby -r yaml -e "path = 'c:/ProgramData/gemrc'; yaml = YAML.safe_load(File.read(path)); yaml['install'] = '--no-document'; yaml['update'] = '--no-document'; File.write(path, YAML.dump(yaml))" \
&& type "c:\ProgramData\gemrc" \
&& gem install oj -v 3.16.5 \
&& gem install json -v 2.7.4 \
&& gem install rexml -v 3.3.9 \
&& gem install fluentd -v 1.18.0 \
&& gem install win32-service -v 2.3.2 \
&& gem install win32-ipc -v 0.7.0 \
&& gem install win32-event -v 0.6.3 \
&& gem sources --clear-all
# Remove gem cache and chocolatey
RUN powershell -Command "Remove-Item -Force C:\ruby32\lib\ruby\gems\3.2.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'"
COPY fluent.conf /fluent/conf/fluent.conf
ENV FLUENTD_CONF="fluent.conf"
EXPOSE 24224 5140
ENTRYPOINT ["cmd", "/k", "fluentd", "--config", "C:\\fluent\\conf\\fluent.conf"]