-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
58 lines (48 loc) · 1.9 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
ENV SERVER_PORT 8989
ENV DATASOURCE_DATABASE redis_manager
ENV DATASOURCE_ADDR localhost:3306
ENV DATASOURCE_USERNAME root
ENV DATASOURCE_PASSWORD rootmysqlpassword
ENV TEST_REDIS_PASSWORD redispassword
ENV RM_AUTH_USERNAME admin
ENV RM_AUTH_PASSWORD rmpassword
ENV RM_AUTH_COMPANY_NAME define_company_name
ENV RM_AUTH_SERVER define_server
ENV RM_AUTH_SITE_KEY define_site_key
ENV RM_AUTH_SITE_SECRET define_site_secret
ENV CURRENT_HOST ''
USER root
RUN apt update
RUN apt install -y apt-utils
RUN apt install -y procps lsof net-tools lsb-release curl wget lrzsz iputils-ping
RUN apt install -y openjdk-8-jre-headless
RUN apt install -y redis-server
RUN apt-get -qq install --no-install-recommends vim > /dev/null
RUN apt-get -qq install -y mysql-server --fix-missing --fix-broken > /dev/null
RUN mkdir -p /var/run/mysqld \
&& chown mysql /var/run/mysqld/
COPY ./redis-manager /app/redis-manager
COPY ./bootstrap.sh /app/bootstrap.sh
COPY ./mysql /app/mysql
RUN chmod 777 /app/bootstrap.sh \
&& chmod 777 /app/mysql/*.sh \
&& chmod 777 /app/redis-manager/bin/*.sh \
&& chmod 777 /app/redis-manager/conf/*.sh \
&& rm -rf /app/redis-manager/conf/application.yml \
&& rm -rf /app/mysql/change_root_pwd.sql \
&& rm -rf /app/mysql/check_is_exist_db.sql \
&& rm -rf /app/mysql/create_db.sql \
&& echo "set encoding=utf-8" >> /root/.vimrc
RUN mv /var/lib/mysql /var/lib/mysql.bak
RUN sed -i "s/^bind 127.0.0.1/#bind 127.0.0.1/" /etc/redis/redis.conf \
&& sed -i "s/^protected-mode yes/protected-mode no/" /etc/redis/redis.conf \
&& sed -i "s/^# requirepass foobared/requirepass rootredispassword/" /etc/redis/redis.conf \
&& sed -i "s/bind-address/bind-address = 0.0.0.0 #/" /etc/mysql/mysql.conf.d/mysqld.cnf
### 可以映射的目录
#VOLUME ["/var/lib/mysql", "/data"]
EXPOSE 8989
WORKDIR /app
CMD ["/app/bootstrap.sh"]