Skip to content
Snippets Groups Projects
Commit 8792cbce authored by George Sedov's avatar George Sedov
Browse files

update docker

parent 28d601f2
No related branches found
No related tags found
No related merge requests found
FROM golang:1.17.6-bullseye
RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor > /usr/share/keyrings/nomad-hashicorp-archive-keyring.gpg
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/nomad-hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com bullseye main" >> /etc/apt/sources.list
RUN curl -fsSL https://www.mongodb.org/static/pgp/server-5.0.asc | gpg --dearmor > /usr/share/keyrings/mongodb-archive-keyring.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main" >> /etc/apt/sources.list
RUN set -eux; \
apt-get update; \
......@@ -21,10 +26,14 @@ RUN set -eux; \
consul \
iproute2 \
nginx-light \
mongodb-org-server \
; \
rm -rf /var/lib/apt/lists/*
RUN echo "data_dir = \"/opt/nomad/data\"\n\
RUN curl -fsSL https://raw.githubusercontent.com/mongodb/mongo/master/debian/init.d > /etc/init.d/mongod
RUN chmod a+x /etc/init.d/mongod
RUN echo "data_dir = \"/tmp/nomad\"\n\
bind_addr = \"0.0.0.0\"\n\
server {\n\
enabled = true\n\
......@@ -33,11 +42,38 @@ server {\n\
client {\n\
enabled = true\n\
servers = [\"127.0.0.1\"]\n\
}\n\
plugin \"raw_exec\" {\n\
config {\n\
enabled = true\n\
}\n\
}" > /etc/nomad/00-general.hcl
RUN echo "enable_script_checks = true\n\
recursors = [\"8.8.8.8\"]\n\
domain = \"asapo\"\n\
data_dir = \"/tmp/consul\"\n\
enable_syslog = false\n\
enable_debug = false\n\
ui = true\n\
addresses = {\n\
"http" = \"0.0.0.0\"\n\
}\n\
advertise_addr = \"127.0.0.1\"\n\
node_meta = {\n\
ib_address = \"10.10.0.1\"\n\
}\n\
server=true\n\
bootstrap_expect=1\n\
telemetry = {\n\
disable_compat_1.9 = false\n\
prometheus_retention_time = \"24h\"\n\
}" > /etc/consul.d/00-log_level.hcl
RUN echo "\n\
service nomad start\n\
service consul start\n\
service mongod start\n\
" > /services_start.sh
CMD ["bash", "/services_start.sh"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment