-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.ubuntu
122 lines (84 loc) · 4.49 KB
/
Dockerfile.ubuntu
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Especifica a imagem base
FROM ubuntu:latest
# Define o modo noninteractive para evitar interações durante a instalação de pacotes
ENV DEBIAN_FRONTEND=noninteractive
# Instala os pacotes necessários e define a zona horária para America/Sao_Paulo
RUN apt-get update && apt-get install -y tzdata \
&& ln -fs /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata
# Adiciona arquitetura i386
RUN dpkg --add-architecture i386
# Atualiza os pacotes e realiza o upgrade
RUN apt update && apt upgrade -y
# Executa o update apos adicionar novos repositorios
RUN apt update
# Instala os pacotes necessarios
RUN apt install -y --fix-missing libxml-dom-perl libxml2-dev libssl-dev libpcre3-dev
RUN apt install -y --fix-missing libstdc++5 build-essential gcc-multilib g++-multilib libstdc++6 libgcc1
RUN apt install -y --fix-missing zlib1g libncurses5 mc screen htop mono-complete exim4 p7zip* libpcap-dev
RUN apt install -y --fix-missing curl wget ipset net-tools tzdata ntpdate
RUN apt install -y --fix-missing make gcc g++ libssl-dev libcrypto++-dev libpcre3 libpcre3-dev
RUN apt install -y --fix-missing libtesseract-dev libx11-dev gcc-multilib libc6-dev
RUN apt install -y --fix-missing build-essential gcc-multilib g++-multilib libtemplate-plugin-xml-perl libxml2-dev
RUN apt install -y --fix-missing libdb++-dev libdb-dev libdb5.3 libdb5.3++ libdb5.3++-dev
RUN apt install -y --fix-missing libdb5.3-dbg libdb5.3-dev libmysqlcppconn-dev dos2unix
RUN apt install -y --fix-missing nano git-all mariadb-client
RUN apt install -y --fix-missing make gcc g++ libssl-dev libcrypto++-dev libpcre3 libpcre3-dev libtesseract-dev libx11-dev gcc-multilib build-essential gcc-multilib g++-multilib libtemplate-plugin-xml-perl libxml2-dev
RUN apt install -y --fix-missing make gcc g++ libssl-dev libssl-dev libcrypto++-dev libpcre3 libpcre3-dev libpcre3 libpcre3-dev libtesseract-dev libx11-dev libx11-dev gcc-multilib libc6-dev build-essential gcc-multilib g++-multilib libtemplate-plugin-xml-perl libxml2-dev libxml2-dev libxml2 libstdc++6 libmariadb-dev-compat libmariadb-dev
RUN apt install -y --fix-missing libxml-dom-perl build-essential gcc-multilib g++-multilib -y
RUN apt install -y --fix-missing libdb++-dev libdb-dev libdb5.3 libdb5.3++ libdb5.3++-dev libdb5.3-dbg libdb5.3-dev
RUN apt install -y --fix-missing libmysqlcppconn-dev
RUN apt install -y --fix-missing mariadb-server mariadb-client mariadb-common
RUN apt install -y --fix-missing libjsoncpp25 libjsoncpp-dev libjsoncpp-doc
RUN apt install -y --fix-missing libcurl4 libcurl4-openssl-dev
RUN apt install -y --fix-missing libmariadb3 libmariadb-dev
RUN apt install -y --fix-missing wget tar xz-utils
RUN wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
RUN tar -xf upx-3.96-amd64_linux.tar.xz
RUN mv upx-3.96-amd64_linux/upx /usr/local/bin/
RUN rm -r upx-3.96-amd64_linux upx-3.96-amd64_linux.tar.xz
# Cria o diretorio e ajusta as permissoes
RUN mkdir /PWServer && chmod -R 0777 /PWServer
# Cria os links simbolicos
RUN ln -s /PWServer/gamed/libtask.so /lib/libtask.so && ln -s /PWServer/gamed/libskill.so /lib/libskill.so
# Limpa os pacotes nao mais necessorios
RUN apt autoremove -y
# Cria pasta /PWSource
RUN mkdir /PWSource && chmod -R 0777 /PWSource
# Instalacao de Locales e Correcao de Configuracoes
RUN apt-get update && apt-get install -y locales dialog \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i '5,$s/^# \([^ ]\)/\1/' /etc/locale.gen \
&& locale-gen
# Configuracao de variaveis de ambiente para localidade
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_CTYPE en_US.UTF-8
ENV LC_NUMERIC en_US.UTF-8
ENV LC_TIME en_US.UTF-8
ENV LC_COLLATE en_US.UTF-8
ENV LC_MONETARY en_US.UTF-8
ENV LC_MESSAGES en_US.UTF-8
ENV LC_PAPER en_US.UTF-8
ENV LC_NAME en_US.UTF-8
ENV LC_ADDRESS en_US.UTF-8
ENV LC_TELEPHONE en_US.UTF-8
ENV LC_MEASUREMENT en_US.UTF-8
ENV LC_IDENTIFICATION en_US.UTF-8
RUN chmod -R 0777 /PWSource
RUN apt-get update && \
apt-get install -y gcc-10 g++-10 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
RUN rm /usr/bin/gcc
RUN rm /usr/bin/g++
RUN ln -s /usr/bin/gcc-10 /usr/bin/gcc
RUN ln -s /usr/bin/g++-10 /usr/bin/g++
# Copia o script de inicialização
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Define o script como ponto de entrada
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/bin/bash"]