Compare commits

...

112 Commits

Author SHA1 Message Date
Geoff Bourne
19b77ba18b [kibana] Upgrade to 4.1.1
resolves #38
2015-07-18 09:27:08 -05:00
Geoff Bourne
f911230c1b [titan-gremlin] Refresh of base packages 2015-07-18 09:15:39 -05:00
Geoff Bourne
1c7469bb8c [ubuntu-openjdk-7] Add unzip to base packages 2015-07-18 09:12:13 -05:00
Geoff Bourne
b5abb012db [cass] Upgraded to 2.1.8 2015-07-18 08:46:44 -05:00
Geoff Bourne
64b428f920 Refresh packages on ubuntu-openjdk-7 base 2015-07-16 21:48:39 -05:00
Geoff Bourne
9ffdc49c1b Merge pull request #35 from domse/patch-1
Update README.md
2015-06-22 06:52:03 -05:00
domse
3f5fa1642b Update README.md
Corrected a little frustrating misspelling.
2015-06-22 10:57:42 +02:00
Geoff Bourne
6570028c06 Merge pull request #34 from nichivo/master
Fix for new Forge URLs from 1.7.10-10.13.2.1300
2015-06-13 07:45:44 -05:00
nichivo
ed19d745cb URL format changed for Forge 1.7.10 from 10.13.2.1300 2015-06-13 16:51:07 +10:00
nichivo
f2e6696368 Updated Forge usage docs and set FORGEVERSION=RECOMMENDED by default 2015-06-13 16:49:08 +10:00
Geoff Bourne
83c31483f7 Merge pull request #32 from timvisher/feature/add-difficulty-knob
Add difficulty knob.
2015-06-11 18:25:28 -05:00
Geoff Bourne
b077b3fcf2 Fixing #33 : upgrade kibana to 4.1.0 2015-06-10 21:48:52 -05:00
Geoff Bourne
81ab299419 Fixing #29 : upgrade logstash to 1.5.0 (GA) 2015-06-10 21:46:05 -05:00
Tim Visher
53a0d0cf7a Default to easy. 2015-06-10 15:12:05 -04:00
Tim Visher
99b884f18a Add note to README about setting world difficulty. 2015-06-10 15:00:53 -04:00
Tim Visher
ebc0405e72 typo. 2015-06-10 14:14:31 -04:00
Tim Visher
b86370295c Add difficulty knob. 2015-06-10 14:13:36 -04:00
Geoff Bourne
7e624b90dd [es] Upgraded to 1.6.0 2015-06-09 19:57:30 -05:00
Geoff Bourne
6ba5fe29c1 Merge pull request #26 from 55chevypickup/patch-1
Added the ability to select forge version
2015-05-21 19:49:43 -05:00
Geoff Bourne
f9c7dddb19 [titan-gremin] Fixed linked ES container lookup
* removed unnecessary complexity from README
2015-05-19 20:41:17 -05:00
Geoff Bourne
ea32f70dd7 [logstash] Upgrade to 2.0.15 2015-05-19 19:50:44 -05:00
55chevypickup
0f466e2146 Added the ability to select forge version
Added the ability to select forge version by adding -e FORGEVERSION=10.13.3.1403-1.7.10 or -e FORGEVERSION=RECOMMENDED
2015-05-11 15:45:23 -05:00
Geoff Bourne
128dd8950a [es] Upgraded to 1.5.2 2015-04-27 21:31:35 -05:00
Geoff Bourne
5c947fd4ab [logstash] Added README 2015-04-12 22:11:10 -05:00
Geoff Bourne
5792b2996a Adding logstash image with pre-install of elasticsearch_groom 2015-04-12 11:09:49 -05:00
Geoff Bourne
57ca565d64 [es] Upgrade to 1.5.1 2015-04-12 08:01:33 -05:00
Geoff Bourne
63925a794c For #19: added PVP env var options
* also adding a marker env var for MCCY to reference
2015-03-29 13:39:25 -05:00
Geoff Bourne
d4d070018a [mc] Adding APT_GET_UPDATE to ensure latest base image is used on hub 2015-03-28 13:16:10 -05:00
Geoff Bourne
8594054047 Fixing #21 by using sudo instead of su 2015-03-28 13:10:39 -05:00
Geoff Bourne
6f62af7d85 Fixed #22: upgraded ES to 1.5.0 2015-03-26 02:26:27 +00:00
Geoff Bourne
b1f9d1c7c6 Use Forge recommended (not latest) version
* Misc Dockerfile cleanup
** use COPY instead of ADD
** wget is now pre-installed by base image
2015-03-20 20:26:43 -05:00
Geoff Bourne
8c3b0a720d Merge pull request #20 from justinclayton/patch-1
minecraft-server: fixing quotes so volume will create correctly
2015-03-17 12:44:48 -05:00
Justin Clayton
cc3730e5a9 minecraft-server: fixing quotes so volume will create correctly
Single quotes don't work for VOLUME, but double quotes do.
2015-03-17 10:37:47 -07:00
Geoff Bourne
7b58d59cef Add kibana to build 2015-03-08 19:05:34 -05:00
Geoff Bourne
84c3ea2465 Adding a Kibana 4 image 2015-03-08 18:54:37 -05:00
Geoff Bourne
78d9add46c Go ahead and install with openjdk image 2015-03-08 17:34:50 -05:00
Geoff Bourne
2f18e7be04 Merge pull request #18 from itzg/mc-attach
[mc] Update README to describe attach mode
2015-03-07 13:12:16 -06:00
Geoff Bourne
011108cd7e Fix typo in TLS info 2015-03-07 11:41:26 -06:00
Geoff Bourne
1600b75513 [mc] Update README to describe attach mode 2015-03-06 22:21:26 -06:00
Geoff Bourne
9962d28f41 Dangling forge-data reference 2015-03-05 15:16:35 -06:00
Geoff Bourne
ea08a6b496 Consistent description of /path/on/host 2015-03-05 15:13:17 -06:00
Geoff Bourne
a61d44ff30 Webhook into CircleCI 2015-03-05 15:10:28 -06:00
Geoff Bourne
5e14d3fbdd Improve Forge instructions 2015-03-05 15:04:48 -06:00
Geoff Bourne
eb28c2c980 Add docker service to CircleCI config 2015-03-05 14:34:28 -06:00
Geoff Bourne
024800201f Fix build script 2015-03-05 14:32:50 -06:00
Geoff Bourne
32e5f94a87 Configuring CircleCI to perform docker build to "test" 2015-03-05 14:30:46 -06:00
Geoff Bourne
88032acbfb Merge pull request #17 from itzg/forge-2
Resolves #14
2015-03-05 14:18:17 -06:00
Geoff Bourne
22e1abe628 [minecraft-server] Update README with new TYPE option 2015-03-05 14:16:14 -06:00
Geoff Bourne
01d9c54575 Simplify down our options when it comes to forge versions 2015-03-04 22:21:52 -06:00
Geoff Bourne
fab9669b42 Merge remote-tracking branch 'remotes/dan/forge' into forge-2 2015-03-04 21:35:35 -06:00
Daniel L. Polanco
df09adbfd7 Add non-working code to work with Goeff 2015-03-04 20:07:37 -07:00
Geoff Bourne
9e373d8b4d Update README.md 2015-03-04 19:35:09 -06:00
Daniel L. Polanco
2f4b73d862 Remove commented out cd /data from testing 2015-03-04 18:17:20 -07:00
Daniel L. Polanco
a252d794f9 Fix bad variable names 2015-03-04 18:15:36 -07:00
Daniel L. Polanco
79438e14de Simplify start-minecraft.sh 2015-03-04 17:47:54 -07:00
Daniel L. Polanco
ddbc7e9618 Add apt-get update to beginning of Dockerfile 2015-03-04 17:06:51 -07:00
Daniel L. Polanco
87140179f2 Add option for Vanilla or Forge server 2015-03-04 16:55:57 -07:00
Daniel L. Polanco
14a1e5fb2a Add initial version of forge download scraper 2015-03-01 21:39:38 -07:00
Geoff Bourne
2e8704a311 Merge pull request #13 from steveblackmon/master
bump to 1.4.4
2015-02-20 06:30:30 -06:00
Steve Blackmon
b1741cab7b bump to 1.4.4 2015-02-19 22:48:23 -06:00
Geoff Bourne
d63bc698d8 [jenkins] Added JNLP port info to README 2015-02-17 19:35:39 -06:00
Geoff Bourne
574fc53a55 Adding a fixed port for JNLP launched slave agents 2015-02-17 19:32:47 -06:00
Geoff Bourne
b75379a980 [jenkins] Adding git and openjdk install example 2015-02-17 19:11:53 -06:00
Geoff Bourne
086d9fb4ae [jenkins] Initial commit of self-upgrading Jenkins 2015-02-16 22:30:06 -06:00
Geoff Bourne
214fcda183 [titan-gremlin] Updated README for itzg/cassandra usage 2015-02-16 14:52:19 +00:00
Geoff Bourne
4dff67e03b [titan-gremlin] Automatically use 'itzg/cassandra' image's publish-as address 2015-02-16 14:50:03 +00:00
Geoff Bourne
78d82b334b [cassandra] Creating a Cassandra image that works with titan-gremlin and Titan Browser 2015-02-16 14:48:42 +00:00
Geoff Bourne
3059282c7a [ubuntu-openjdk-7] Refresh the apt cache 2015-02-15 06:18:07 +00:00
Geoff Bourne
88509c66a6 [titan-gremlin] Adding apt-clean and skipping extra bash in CMD spec 2015-02-15 06:12:51 +00:00
Geoff Bourne
307a9b119f [titan-gremlin] Fix typo in README 2015-02-15 00:08:18 -06:00
Geoff Bourne
6c58660a73 [titan-gremlin] Making it super easy to link to Cassandra and ES containers 2015-02-15 06:05:08 +00:00
Geoff Bourne
b7f5088b13 Merge pull request #12 from dfanchon/patch-1
Change ES version to 1.4.3
2015-02-13 08:38:23 -06:00
Didier Fanchon
abee16a143 Change ES version to 1.4.3 2015-02-13 15:36:48 +01:00
Geoff Bourne
8319b336c7 [minecraft-server] Updated README for new -e UID option (fixes #9) 2015-01-28 19:52:42 -06:00
Geoff Bourne
6ea862859b * Updating openjdk base image 2015-01-27 22:01:25 -06:00
Geoff Bourne
88a796bb44 Issue #9: performing usermod to allow for -e provided uid of the minecraft server process
* corrected .dockerignore to allow for a $(pwd)/data for local testing of -v
2015-01-26 03:29:35 +00:00
Geoff Bourne
a8c3afbe88 Merge pull request #10 from andreasheil/master
propagate SIGTERM to the Minecraft process
2015-01-05 18:16:23 -06:00
Andreas Heil
60b6eea1e2 propagate SIGTERM to the Minecraft process 2015-01-05 10:32:31 +01:00
Geoff Bourne
bc9afcd659 [minecraft-server] Issue #9: explicitly adding user in container with UID=1000 2015-01-03 14:17:05 +00:00
Geoff Bourne
052f80d849 [minecraft-server] Issue #9: Added back the /start file in the image 2015-01-01 23:47:12 +00:00
Geoff Bourne
7e847829ee * also moved EULA check before download to fail-fast 2015-01-01 16:01:15 +00:00
Geoff Bourne
44c0eee0f9 Updating minecraft-server README with SEED and MODE options 2015-01-01 09:22:59 -06:00
Geoff Bourne
0337f9fac1 Adding Minecraft -e options for the game mode and level seed 2015-01-01 15:10:41 +00:00
Geoff Bourne
287185919a Upgrading to ES 1.4.2 2014-12-22 20:44:27 -06:00
Geoff Bourne
b895e07e82 Default the versioning to grab latest stable 2014-12-06 10:26:03 -06:00
Geoff Bourne
6396e58d3c Upgrading default minecraft server to 1.8.1 2014-12-01 04:05:12 +00:00
Geoff Bourne
4de10e1ba8 Reposition ES_VERSION after apt-get operations 2014-11-30 21:39:59 -06:00
Geoff Bourne
1a364ae733 Upgrading ES to 1.4.1 2014-11-30 18:56:16 -06:00
Geoff Bourne
9ffa2daeaa Fixing minor typos in README 2014-11-30 17:59:09 -06:00
Geoff Bourne
8973e7dc7b Deprecating the elasticsearch-marvel image 2014-11-15 15:29:49 -06:00
Geoff Bourne
3c8db58c7e Adding 1.4 stream at 1.4.0 2014-11-15 21:15:33 +00:00
Geoff Bourne
ee9f27546b Removing command-echoing in start script and adding info output 2014-11-15 21:12:49 +00:00
Geoff Bourne
8a2199a890 Added a README 2014-11-15 15:02:27 -06:00
Geoff Bourne
b4be1b37bd Added support for installing plugins 2014-11-15 20:10:06 +00:00
Geoff Bourne
d590bc62c1 Added PUBLISH_AS capability 2014-11-15 18:05:01 +00:00
Geoff Bourne
9349ca6d04 Initial setup of direct-from-elasticsearch.org install 2014-11-15 04:39:34 +00:00
Geoff Bourne
9e845521a9 Updated README for enhancement #6
Also trimming trailing whitespace
2014-11-09 10:49:31 -06:00
Geoff Bourne
5557f91c79 Adding image download and scaling logic for enhancement #6 2014-11-09 16:27:05 +00:00
Geoff Bourne
c324403f95 Merge pull request #5 from justfalter/minecraft-proper-shutdown
Fix minecraft shutdown
2014-11-01 18:40:56 -05:00
Mike Ryan
9fe8d6cca6 Use 'exec' syntax, fix signal handling
- Fix to allow signals to pass into the container, properly.
  'docker stop ...' was resorting to SIGKILL to stop the container,
  which results in data loss. This change switches CMD to 'exec' mode,
  ensuring signals make their way to the java process so that things
  shut down properly.
2014-11-01 18:17:15 -05:00
Geoff Bourne
55cffbb598 Merge pull request #4 from justfalter/minecraft-drop-privs
Drop privileges before starting server
2014-11-01 17:37:14 -05:00
Mike Ryan
4ff077f151 Drop privileges before starting server
- Create 'minecraft' user account within image.
- Drop to 'minecraft' user before starting server.
2014-11-01 15:35:36 -05:00
Geoff Bourne
5566cf0953 Updating apt-get baseline for openjdk-7 2014-10-13 13:56:21 +00:00
Geoff Bourne
5d3845a9ba Added note about multiple containers 2014-09-28 16:48:44 -05:00
Geoff Bourne
b952ee6fdd Describe existing LEVEL option and fix typos in -v section 2014-09-28 16:27:03 -05:00
Geoff Bourne
8035aa5f69 Fixed some typos in the README 2014-09-25 16:51:54 -05:00
Geoff Bourne
84521eca53 [minecraft-server] General info about Docker port mappings and container naming 2014-09-20 15:54:23 -05:00
Geoff Bourne
77541a9689 Added support adding 'op' users
* Non-destructive MOTD setting
2014-09-20 14:10:48 +00:00
Geoff Bourne
716ff66b1b Adding a container for the Titan graph database distribution 2014-09-19 02:49:44 +00:00
Geoff Bourne
029e7d8974 Install nodejs to satisfy latest Jekyll installation requirements 2014-09-19 02:08:15 +00:00
Geoff Bourne
7d8429ef0a Allowing for pre-existing eula.txt
Adding memory settings info to README
2014-09-08 02:32:55 +00:00
Geoff Bourne
df155ee51c Updating to JDK 7u65 2014-09-08 02:08:24 +00:00
34 changed files with 1032 additions and 89 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.idea/

View File

@@ -2,3 +2,5 @@ dockerfiles
===========
Contains the various Dockerfile definitions I'm maintaining.
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/itzg/dockerfiles?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

9
build
View File

@@ -1,4 +1,11 @@
pkgs="ubuntu-openjdk-7 gvm spring-boot"
#!/bin/bash
pkgs=ubuntu-openjdk-7
pkgs="$pkgs minecraft-server"
pkgs="$pkgs elasticsearch"
pkgs="$pkgs kibana"
pkgs="$pkgs titan-gremlin"
pkgs="$pkgs cassandra"
for p in $pkgs
do

26
cassandra/Dockerfile Executable file
View File

@@ -0,0 +1,26 @@
FROM itzg/ubuntu-openjdk-7
MAINTAINER itzg
ENV CASSANDRA_VERSION 2.1.8
RUN wget -qO /tmp/apache-cassandra.tgz http://mirrors.ibiblio.org/apache/cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz
RUN tar -C /opt -zxvf /tmp/apache-cassandra.tgz && \
rm /tmp/apache-cassandra.tgz
RUN mv /opt/apache-cassandra-$CASSANDRA_VERSION /opt/cassandra
ENV CASSANDRA_HOME /opt/cassandra
ENV CASSANDRA_CONF /conf
ENV CASSANDRA_DATA /data
WORKDIR $CASSANDRA_HOME
RUN ln -s $CASSANDRA_HOME/bin/* /usr/local/bin
VOLUME ["/data","/conf"]
EXPOSE 9042 9160 7000 7001
ADD cassandra.in.sh $CASSANDRA_HOME/cassandra.in.sh
RUN mv $CASSANDRA_HOME/bin/cassandra.in.sh $CASSANDRA_HOME/bin/orig.cassandra.in.sh
CMD ["/opt/cassandra/bin/cassandra", "-f"]

9
cassandra/README.md Normal file
View File

@@ -0,0 +1,9 @@
Yet another Cassandra image, but this one got container and non-container access right.
# Basic Usage
To support access from both Docker containers and external, non-Docker clients:
docker run -d --name cassandra -e PUBLISH_AS=192.168.59.103 -p 9160:9160 itzg/cassandra
replacing `192.168.59.103` with your Docker host's LAN IP address.

27
cassandra/cassandra.in.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
sed -i -e 's/log4j.rootLogger=.*/log4j.rootLogger=INFO,stdout/' $CASSANDRA_HOME/conf/log4j-server.properties
cassYml=$CASSANDRA_HOME/conf/cassandra.yaml
privateAddr=$(hostname -i)
seeds=${SEEDS:-${PUBLISH_AS:-$privateAddr}}
sed -i -e "s/- seeds:.*/- seeds: \"$seeds\"/" $cassYml
sed -i -e "s/listen_address:.*/listen_address: $privateAddr/" $cassYml
sed -i -e "s/rpc_address:.*/rpc_address: $privateAddr/" $cassYml
sed -i -e "s#- /var/lib/cassandra/data#- $CASSANDRA_DATA#" $cassYml
if [ -n "$PUBLISH_AS" ]; then
sed -i -e "s/\(\s*#\)\?\s*broadcast_address:.*/broadcast_address: $PUBLISH_AS/" $cassYml
fi
# Copy over our tweaked files, but non-clobbering to let user have ultimate control
cp -rn $CASSANDRA_HOME/conf/* $CASSANDRA_CONF
# source the original
. $CASSANDRA_HOME/bin/orig.cassandra.in.sh

11
circle.yml Normal file
View File

@@ -0,0 +1,11 @@
machine:
services:
- docker
test:
override:
- ./build
notify:
webhooks:
- url: https://webhooks.gitter.im/e/4726bb683d8aed018486

View File

@@ -1,5 +0,0 @@
FROM dockerfile/elasticsearch
MAINTAINER itzg
RUN /elasticsearch/bin/plugin -i elasticsearch/marvel/latest

View File

@@ -1,11 +1,5 @@
This image extends the official elasticsearch image by adding the Marvel Sense plugin. This will get you a system ready to use with the [ElasticSearch Getting Started Guide](http://www.elasticsearch.org/guide/en/elasticsearch/guide/current).
**This image is now deprecated. **
Start the container with a command-line such as
docker run -d --name es -p 9200:9200 -p 9300:9300 itzg/elasticsearch-marvel
and now with Marvel Sense installed you can access it using a URL like:
http://192.168.59.103:9200/_plugin/marvel/sense/index.html
(replacing the IP address shown here with your Docker host's)
Please use [itzg/elasticsearch](https://registry.hub.docker.com/u/itzg/elasticsearch/)
instead. See the plugins configuration section for that image to see how
to install Marvel.

26
elasticsearch/Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM itzg/ubuntu-openjdk-7
MAINTAINER itzg
ENV ES_VERSION 1.6.0
RUN wget -qO /tmp/es.tgz https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ES_VERSION.tar.gz && \
cd /usr/share && \
tar xf /tmp/es.tgz && \
rm /tmp/es.tgz
ENV ES_HOME /usr/share/elasticsearch-$ES_VERSION
RUN useradd -d $ES_HOME -M -r elasticsearch && \
chown -R elasticsearch: $ES_HOME
RUN mkdir /data /conf && touch /data/.CREATED /conf/.CREATED && chown -R elasticsearch: /data /conf
VOLUME ["/data","/conf"]
ADD start /start
WORKDIR $ES_HOME
USER elasticsearch
EXPOSE 9200 9300
CMD ["/start"]

120
elasticsearch/README.md Normal file
View File

@@ -0,0 +1,120 @@
This Docker image provides an easily configurable Elasticsearch node. Via
port mappings, it is easy to create an arbitrarily sized cluster of
nodes. As long as the versions match, you can mix-and-match "real"
Elasticsearch nodes with container-ized ones.
# Basic Usage
To start an Elasticsearch data node that listens on the standard ports on
your host's network interface:
docker run -d -p 9200:9200 -p 9300:9300 itzg/elasticsearch
You'll then be able to connect to the Elasticsearch HTTP interface to confirm
it's alive:
http://DOCKERHOST:9200/
{
"status" : 200,
"name" : "Charon",
"version" : {
"number" : "1.3.5",
"build_hash" : "4a50e7df768fddd572f48830ae9c35e4ded86ac1",
"build_timestamp" : "2014-11-05T15:21:28Z",
"build_snapshot" : false,
"lucene_version" : "4.9"
},
"tagline" : "You Know, for Search"
}
Where `DOCKERHOST` would be the actual hostname of your host running
Docker.
# Basic multi-node cluster
Running a multi-node cluster (3-node in this example) is almost as easy:
docker run -d -p 9200:9200 -p 9300:9300 itzg/elasticsearch
docker run -d -p 9201:9200 -p 9301:9300 itzg/elasticsearch
docker run -d -p 9202:9200 -p 9302:9300 itzg/elasticsearch
where the only difference was the host port binding of `9200:`/`9300:`,
`9201:`/`9301:`, and `9202:`/`9302:`. By default, Elasticsearch uses
[Zen Discovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html), so the three nodes find each other and form a cluster. You
can confirm that by checking the cluster health for the presence of
three nodes (`number_of_nodes`):
http://DOCKERHOST:9200/_cluster/health?pretty
{
"cluster_name" : "elasticsearch",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 3,
"number_of_data_nodes" : 3,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0
}
# Configuration
The following configuration options are specified using `docker run`
environment variables (`-e`) like
docker run ... -e NAME=VALUE ... itzg/elasticsearch
## Cluster Name
If joining a pre-existing cluster, then you may need to specify a cluster name
different than the default "elasticsearch":
-e CLUSTER=dockers
## Zen Unicast Hosts
When joining a multi-physical-host cluster, multicast may not be supported
on the physical network. In that case, your node can reference specific one or more hosts in
the cluster via the
[Zen Unicast Hosts](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#unicast) capability as a comma-separated list of `HOST:PORT` pairs:
-e UNICAST_HOSTS=HOST:PORT[,HOST:PORT]
such as
-e UNICAST_HOSTS=192.168.0.100:9300
## Plugins
You can install one or more plugins before startup by passing a comma-separated
list of plugins.
-e PLUGINS=ID[,ID]
In this example, it will install the Marvel plugin
-e PLUGINS=elasticsearch/marvel/latest
Many more plugins [are available here](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-plugins.html#known-plugins).
## Publish As
Since the container gives the Elasticsearch software an isolated perspective
of its networking, it will most likely advertise its published address with
a container-internal IP address. This can be overridden with a physical networking
name and port using:
-e PUBLISH_AS=DOCKERHOST:9301
_Author Note: I have yet to hit a case where this was actually necessary. Other
than the cosmetic weirdness in the logs, Elasticsearch seems to be quite tolerant._
## Node Name
Rather than use the randomly assigned node name, you can indicate a specific
one using:
-e NODE_NAME=Docker

43
elasticsearch/start Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/sh
if [ ! -e /conf/elasticsearch.* ]; then
cp $ES_HOME/config/elasticsearch.yml /conf
fi
if [ ! -e /conf/logging.* ]; then
cp $ES_HOME/config/logging.yml /conf
fi
OPTS="-Des.path.conf=/conf \
-Des.path.data=/data \
-Des.path.logs=/data \
-Des.transport.tcp.port=9300 \
-Des.http.port=9200"
if [ -n "$CLUSTER" ]; then
OPTS="$OPTS -Des.cluster.name=$CLUSTER"
fi
if [ -n "$NODE_NAME" ]; then
OPTS="$OPTS -Des.node.name=$NODE_NAME"
fi
if [ -n "$UNICAST_HOSTS" ]; then
OPTS="$OPTS -Des.discovery.zen.ping.unicast.hosts=$UNICAST_HOSTS"
fi
if [ -n "$PUBLISH_AS" ]; then
OPTS="$OPTS -Des.transport.publish_host=$(echo $PUBLISH_AS | awk -F: '{print $1}')"
OPTS="$OPTS -Des.transport.publish_port=$(echo $PUBLISH_AS | awk -F: '{if ($2) print $2; else print 9300}')"
fi
if [ -n "$PLUGINS" ]; then
for p in $(echo $PLUGINS | awk -v RS=, '{print}')
do
echo "Installing the plugin $p"
$ES_HOME/bin/plugin --install $p
done
fi
echo "Starting Elasticsearch with the options $OPTS"
$ES_HOME/bin/elasticsearch $OPTS

View File

@@ -2,10 +2,12 @@ FROM ubuntu:trusty
MAINTAINER itzg
ENV APT_GET_UPDATE 2014-09-18
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install ruby ruby-dev make patch
RUN apt-get -y install ruby ruby-dev make patch nodejs
RUN gem install bundler
ADD Gemfile /tmp/Gemfile

View File

@@ -0,0 +1 @@
highlighter: pygments

13
jenkins/Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM itzg/ubuntu-openjdk-7
MAINTAINER itzg
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install curl && apt-get clean
ADD download-and-start.sh /download-and-start
ENV JENKINS_HOME /data
VOLUME ["/data"]
EXPOSE 8080 38252
CMD ["/download-and-start"]

49
jenkins/README.md Normal file
View File

@@ -0,0 +1,49 @@
A self-upgrading [Jenkins CI](http://jenkins-ci.org/) server
# Basic Usage
To start Jenkins with the latest version:
ID=$(docker run -d -p 8080:8080 itzg/jenkins)
At a later time, you can upgrade by restarting the container:
docker stop $ID
docker start $ID
# Attaching host directory to Jenkins home directory
The Jenkins home directory is attachable at `/data`, so attaching to a host volume
would be:
ID=$(docker run -d -p 8080:8080 -v /SOME_HOST_DIR:/data itzg/jenkins
# Entering the container to perform manual config
As with any Docker container, you can run a shell within the running container:
docker exec -it $ID bash
A more realistic example is installing git, openjdk-7-jdk, etc:
docker exec $ID apt-get update
docker exec $ID apt-get install -y git openjdk-7-jdk
and then Configure the JDK in Jenkins:
![](http://i.imgur.com/HVetwKc.png)
# Enabling Jenkins slave agents
By default, Jenkins will pick a random port to allow slave nodes launched
by JNLP. Since Docker networking is basically a firewall, a random port
won't work for us. Instead the fixed port **38252** was chosen (arbitrarily)
to be exposed by the container.
Launch your Jenkins container using
ID=$(docker run -d -p 8080:8080 -p 38252:38252 itzg/jenkins)
and configure the port in the Global Security settings:
![](http://i.imgur.com/PhQiEHy.png)

29
jenkins/download-and-start.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
mirrorUrl=http://mirrors.jenkins-ci.org/war/latest/jenkins.war
url=$(curl -s --head $mirrorUrl|awk -F': ' '$1 == "Location" { print $2 }' | sed 's/[[:space:]]*$//')
version=$(echo $url | sed 's#.*/war/\(.*\)/jenkins.war#\1#')
mkdir -p /opt/jenkins
trackingFile=/opt/jenkins/INSTALLED
installed=
if [ -f $trackingFile ]; then
installed=$(cat $trackingFile)
echo "Version installed is $installed"
fi
if [ $version != "$installed" ]; then
echo "Downloading $version from '$url'"
while ! curl -s -o /opt/jenkins/jenkins.war "$url"
do
echo "Trying again in 5 seconds"
sleep 5
done
echo $version > $trackingFile
fi
cd /opt/jenkins
exec java -jar jenkins.war

21
kibana/Dockerfile Executable file
View File

@@ -0,0 +1,21 @@
FROM itzg/ubuntu-openjdk-7
MAINTAINER itzg
ENV KIBANA_VERSION 4.1.1
RUN wget -q -O /tmp/kibana.tgz https://download.elasticsearch.org/kibana/kibana/kibana-${KIBANA_VERSION}-linux-x64.tar.gz
RUN tar -C /opt -xzf /tmp/kibana.tgz && rm /tmp/kibana.tgz
ENV KIBANA_HOME /opt/kibana-$KIBANA_VERSION-linux-x64
# Simplify for cross-container
ENV ES_URL http://es:9200
WORKDIR $KIBANA_HOME
ADD start.sh /start
EXPOSE 5601
CMD ["/start"]

26
kibana/README.md Normal file
View File

@@ -0,0 +1,26 @@
Provides a ready-to-run [Kibana](http://www.elasticsearch.org/overview/kibana/) server that can
easily hook into your [Elasticsearch containers](https://registry.hub.docker.com/u/itzg/elasticsearch/).
## Usage with Docker elasticsearch container
This is by far the easiest and most Docker'ish way to run Kibana.
Assuming you started one or more containers using something like
docker run -d --name your-es -p 9200:9200 itzg/elasticsearch
Start Kibana using
docker run -d -p 5601:5601 --link your-es:es itzg/kibana
Proceed to use Kibana starting from
[this point in the documentation](http://www.elasticsearch.org/guide/en/kibana/current/access.html)
## Usage with non-Docker elasticsearch
Start Kibana using
docker run -d -p 5601:5601 -e ES_URL=http://YOUR_ES:9200 itzg/kibana
Replacing `http://YOUR_ES:9200` with the appropriate URL for your system.

6
kibana/start.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
OPTS="-e $ES_URL"
exec bin/kibana $OPTS

25
logstash/Dockerfile Executable file
View File

@@ -0,0 +1,25 @@
FROM itzg/ubuntu-openjdk-7
MAINTAINER itzg
ENV LOGSTASH_VERSION 1.5.0-1
RUN wget -qO /tmp/logstash.deb http://download.elastic.co/logstash/logstash/packages/debian/logstash_${LOGSTASH_VERSION}_all.deb
RUN dpkg -i /tmp/logstash.deb && rm /tmp/logstash.deb
WORKDIR /opt/logstash
# For collectd reception
EXPOSE 25826
# /conf is the default directory where our logstash will read pipeline config files
# /logs is an optional attach point to reference something like /var/log on the host
VOLUME ["/conf","/logs"]
ENV PLUGIN_UPDATES 2015-06-10
RUN bin/plugin install logstash-input-heartbeat
RUN bin/plugin install logstash-output-elasticsearch_groom
CMD ["bin/logstash","agent","-f","/conf"]

44
logstash/README.md Normal file
View File

@@ -0,0 +1,44 @@
This image bundles the latest (1.5.x) version of Logstash with the ability to
groom its own Elasticsearch indices.
# Basic Usage
To start a Logstash container, setup a directory on your host with one or more Logstash
pipeline configurations files, called `$HOST_CONF` here, and run
docker run -d -v $HOST_CONF:/conf itzg/logstash
# Accessing host logs
Logstash is much more useful when it is actually processing...logs. Logs inside the container
are non-existent, but you can attach the host machine's `/var/log` directory via the container's
`/logs` volume:
docker run ... -v /var/log:/logs ...
Keep in mind you will need to configure `file` inputs with a base path of `/logs`, such as
```
file {
path => ['/logs/syslog']
type => 'syslog'
}
```
# Receiving input from collectd
To allow for incoming [collectd](https://collectd.org/) content, **UDP** port 25826 is exposed and
can be mapped onto the host using:
docker run ... -p 25826:25826/udp
Regardless of the host port, be sure to configure the logstash input to bind at port `25826`, such
as
```
udp {
port => 25826
codec => collectd { }
buffer_size => 1452
}
```

View File

@@ -0,0 +1,25 @@
input {
heartbeat {
type => 'groom'
interval => 11
add_field => {
scope => 'open'
cutoff => '4w'
action => 'close'
}
}
}
output {
if [type] == 'groom' {
elasticsearch_groom {
host => 'es:9200'
index => 'logstash-%{+YYYY.MM.dd}'
scope => '%{scope}'
age_cutoff => '%{cutoff}'
action => '%{action}'
}
}
}

View File

@@ -0,0 +1 @@
data

1
minecraft-server/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/data/

View File

@@ -2,26 +2,33 @@ FROM itzg/ubuntu-openjdk-7
MAINTAINER itzg
ENV APT_UPDATED 2014-09-07
ENV APT_GET_UPDATE 2015-03-28
RUN apt-get update
RUN apt-get install -y wget libmozjs-24-bin
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libmozjs-24-bin imagemagick && apt-get clean
RUN update-alternatives --install /usr/bin/js js /usr/bin/js24 100
RUN wget -O /usr/bin/jsawk https://github.com/micha/jsawk/raw/master/jsawk
RUN chmod +x /usr/bin/jsawk
RUN useradd -M -s /bin/false --uid 1000 minecraft \
&& mkdir /data \
&& chown minecraft:minecraft /data
EXPOSE 25565
ADD start.sh /start
COPY start.sh /start
COPY start-minecraft.sh /start-minecraft
VOLUME ['/data']
ADD server.properties /tmp/server.properties
VOLUME ["/data"]
COPY server.properties /tmp/server.properties
WORKDIR /data
CMD /start
CMD [ "/start" ]
# Special marker ENV used by MCCY management tool
ENV MC_IMAGE=YES
ENV UID=1000
ENV MOTD A Minecraft Server Powered by Docker
ENV LEVEL world
ENV JVM_OPTS -Xmx1024M -Xms1024M
ENV VERSION 1.8
ENV TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED LEVEL=world PVP=true DIFFICULTY=easy

View File

@@ -1,37 +1,208 @@
This docker image provides a Minecraft Server that will automatically download the latest stable, latest snapshot, or any specific server version.
This docker image provides a Minecraft Server that will automatically download the latest stable
version at startup. You can also run/upgrade to any specific version or the
latest snapshot. See the *Versions* section below for more information.
To simply use the latest stable version, run
docker run -d -p 25565:25565 itzg/minecraft-server
where the default server port, 25565, will be exposed on your host machine.
where the standard server port, 25565, will be exposed on your host machine.
If you want to serve up multiple Minecraft servers or just use an alternate port,
change the host-side port mapping such as
docker run -p 25566:25565 ...
will serve your Minecraft server on your host's port 25566 since the `-p` syntax is
`host-port`:`container-port`.
Speaking of multiple servers, it's handy to give your containers explicit names using `--name`, such as
docker run -d -p 25565:25565 --name mc itzg/minecraft-server
With that you can easily view the logs, stop, or re-start the container:
docker logs -f mc
( Ctrl-C to exit logs action )
docker stop mc
docker start mc
## Interacting with the server
In order to attach and interact with the Minecraft server, add `-it` when starting the container, such as
docker run -d -it -p 25565:25565 --name mc itzg/minecraft-server
With that you can attach and interact at any time using
docker attach mc
and then Control-p Control-q to **detach**.
For remote access, configure your Docker daemon to use a `tcp` socket (such as `-H tcp://0.0.0.0:2375`)
and attach from another machine:
docker -H $HOST:2375 attach mc
Unless you're on a home/private LAN, you should [enable TLS access](https://docs.docker.com/articles/https/).
## EULA Support
Mojang now requires accepting the [Minecraft EULA](https://account.mojang.com/documents/minecraft_eula). To accept add
-e EULA=TRUE
-e EULA=TRUE
such as
docker run -e EULA=TRUE -d -p 25565:25565 itzg/minecraft-server
In order to persist the Minecraft data, which you *probably want to do for a real server setup*, use the `-v` argument to map a local path to the `/data' path in the container,
docker run -d -v /path/on/host:/data -p 25565:25565 itzg/minecraft-server
docker run -d -it -e EULA=TRUE -p 25565:25565 itzg/minecraft-server
## Attaching data directory to host filesystem
In order to readily access the Minecraft data, use the `-v` argument
to map a directory on your host machine to the container's `/data` directory, such as:
docker run -d -v /path/on/host:/data ...
When attached in this way you can stop the server, edit the configuration under your attached `/path/on/host`
and start the server again with `docker start CONTAINERID` to pick up the new configuration.
**NOTE**: By default, the files in the attached directory will be owned by the host user with UID of 1000.
You can use an different UID by passing the option:
-e UID=1000
replacing 1000 with a UID that is present on the host.
Here is one way to find the UID given a username:
grep some_host_user /etc/passwd|cut -d: -f3
## Versions
To use a different Minecraft version, pass the `VERSION` environment variable, which can have the value
* LATEST
* SNAPSHOT
* (or a specific version, such as "1.7.9")
For example, to use the latest snapshot:
docker run -d -e VERSION=SNAPSHOT -p 25565:25565 itzg/minecraft-server
or a specific version:
docker run -d -e VERSION=1.7.9 -p 25565:25565 itzg/minecraft-server
* LATEST
* SNAPSHOT
* (or a specific version, such as "1.7.9")
For example, to use the latest snapshot:
docker run -d -e VERSION=SNAPSHOT ...
or a specific version:
docker run -d -e VERSION=1.7.9 ...
## Running a Forge Server
Enable Forge server mode by adding a `-e TYPE=FORGE` to your command-line.
By default the container will run the `RECOMMENDED` version of [Forge server](http://www.minecraftforge.net/wiki/)
but you can also choose to run a specific version with `-e FORGEVERSION=10.13.4.1448`.
$ docker run -d -v /path/on/host:/data -e VERSION=1.7.10 \
-e TYPE=FORGE -e FORGEVERSION=10.13.4.1448 \
-p 25565:25565 -e EULA=TRUE itzg/minecraft-server
In order to add mods, you will need to attach the container's `/data` directory
(see "Attaching data directory to host filesystem”).
Then, you can add mods to the `/path/on/host/mods` folder you chose. From the example above,
the `/path/on/host` folder contents look like:
```
/path/on/host
├── mods
│   └── ... INSTALL MODS HERE ...
├── config
│   └── ... CONFIGURE MODS HERE ...
├── ops.json
├── server.properties
├── whitelist.json
└── ...
```
If you add mods while the container is running, you'll need to restart it to pick those
up:
docker stop $ID
docker start $ID
## Server configuration
### Difficulty
The difficulty level (default: `easy`) can be set like:
docker run -d -e DIFFICULTY=hard
Valid values are: `peaceful`, `easy`, `normal`, and `hard`, and an
error message will be output in the logs if it's not one of these
values.
### Op/Administrator Players
To add more "op" (aka adminstrator) users to your Minecraft server, pass the Minecraft usernames separated by commas via the `OPS` environment variable, such as
docker run -d -e OPS=user1,user2 ...
### Server icon
A server icon can be configured using the `ICON` variable. The image will be automatically
downloaded, scaled, and converted from any other image format:
docker run -d -e ICON=http://..../some/image.png ...
### Level Seed
If you want to create the Minecraft level with a specific seed, use `SEED`, such as
docker run -d -e SEED=1785852800490497919 ...
### Game Mode
By default, Minecraft servers are configured to run in Survival mode. You can
change the mode using `MODE` where you can either provide the [standard
numerical values](http://minecraft.gamepedia.com/Game_mode#Game_modes) or the
shortcut values:
* creative
* survival
For example:
docker run -d -e MODE=creative ...
### Message of the Day
The message of the day, shown below each server entry in the UI, can be changed with the `MOTD` environment variable, such as
docker run -d -e 'MOTD=My Server' -p 25565:25565 itzg/minecraft-server
docker run -d -e 'MOTD=My Server' ...
If you leave it off, the last used or default message will be used. _The example shows how to specify a server
message of the day that contains spaces by putting quotes around the whole thing._
### PVP Mode
By default servers are created with player-vs-player (PVP) mode enabled. You can disable this with the `PVP`
environment variable set to `false`, such as
docker run -d -e PVP=false ...
### World Save Name
You can either switch between world saves or run multiple containers with different saves by using the `LEVEL` option,
where the default is "world":
docker run -d -e LEVEL=bonus ...
**NOTE:** if running multiple containers be sure to either specify a different `-v` host directory for each
`LEVEL` in use or don't use `-v` and the container's filesystem will keep things encapsulated.
## JVM Configuration
### Memory Limit
The Java memory limit can be adjusted using the `JVM_OPTS` environment variable, where the default is
the setting shown in the example (max and min at 1024 MB):
docker run -e 'JVM_OPTS=-Xmx1024M -Xms1024M' ...

View File

@@ -29,5 +29,5 @@ spawn-monsters=true
generate-structures=true
view-distance=10
spawn-protection=16
motd=A Minecraft Server
motd=A Minecraft Server powered by Docker

View File

@@ -0,0 +1,168 @@
#!/bin/bash
if [ ! -e /data/eula.txt ]; then
if [ "$EULA" != "" ]; then
echo "# Generated via Docker on $(date)" > eula.txt
echo "eula=$EULA" >> eula.txt
else
echo ""
echo "Please accept the Minecraft EULA at"
echo " https://account.mojang.com/documents/minecraft_eula"
echo "by adding the following immediately after 'docker run':"
echo " -e EULA=TRUE"
echo ""
exit 1
fi
fi
echo "Checking version information."
case $VERSION in
LATEST)
VANILLA_VERSION=`wget -O - https://s3.amazonaws.com/Minecraft.Download/versions/versions.json | jsawk -n 'out(this.latest.release)'`
;;
SNAPSHOT)
VANILLA_VERSION=`wget -O - https://s3.amazonaws.com/Minecraft.Download/versions/versions.json | jsawk -n 'out(this.latest.snapshot)'`
;;
*)
VANILLA_VERSION=$VERSION
;;
esac
cd /data
echo "Checking minecraft / forge type information."
case $TYPE in
VANILLA)
SERVER="minecraft_server.$VANILLA_VERSION.jar"
if [ ! -e $SERVER ]; then
echo "Downloading $SERVER ..."
wget -q https://s3.amazonaws.com/Minecraft.Download/versions/$VANILLA_VERSION/$SERVER
fi
;;
FORGE)
# norm := the official Minecraft version as Forge is tracking it. dropped the third part starting with 1.8
case $VANILLA_VERSION in
1.7.*)
norm=$VANILLA_VERSION
;;
*)
norm=`echo $VANILLA_VERSION | sed 's/^\([0-9]\+\.[0-9]\+\).*/\1/'`
;;
esac
echo "Checking Forge version information."
case $FORGEVERSION in
RECOMMENDED)
FORGE_VERSION=`wget -O - http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json | jsawk -n "out(this.promos['$norm-recommended'])"`
;;
*)
FORGE_VERSION=$FORGEVERSION
;;
esac
# URL format changed for 1.7.10 from 10.13.2.1300
sorted=$((echo $FORGE_VERSION; echo 10.13.2.1300) | sort -V | head -1)
if [[ $norm == '1.7.10' && $sorted == '10.13.2.1300' ]]; then
# if $FORGEVERSION >= 10.13.2.1300
normForgeVersion="$norm-$FORGE_VERSION-$norm"
else
normForgeVersion="$norm-$FORGE_VERSION"
fi
FORGE_INSTALLER="forge-$normForgeVersion-installer.jar"
SERVER="forge-$normForgeVersion-universal.jar"
if [ ! -e $SERVER ]; then
echo "Downloading $FORGE_INSTALLER ..."
wget -q http://files.minecraftforge.net/maven/net/minecraftforge/forge/$normForgeVersion/$FORGE_INSTALLER
echo "Installing $SERVER"
java -jar $FORGE_INSTALLER --installServer
fi
;;
esac
if [ ! -e server.properties ]; then
cp /tmp/server.properties .
if [ -n "$MOTD" ]; then
sed -i "/motd\s*=/ c motd=$MOTD" /data/server.properties
fi
if [ -n "$LEVEL" ]; then
sed -i "/level-name\s*=/ c level-name=$LEVEL" /data/server.properties
fi
if [ -n "$SEED" ]; then
sed -i "/level-seed\s*=/ c level-seed=$SEED" /data/server.properties
fi
if [ -n "$PVP" ]; then
sed -i "/pvp\s*=/ c pvp=$PVP" /data/server.properties
fi
if [ -n "$DIFFICULTY" ]; then
case $DIFFICULTY in
peaceful)
DIFFICULTY=0
;;
easy)
DIFFICULTY=1
;;
normal)
DIFFICULTY=2
;;
hard)
DIFFICULTY=3
;;
*)
echo "DIFFICULTY must be peaceful, easy, normal, or hard."
exit 1
;;
esac
sed -i "/difficulty\s*=/ c difficulty=$DIFFICULTY" /data/server.properties
fi
if [ -n "$MODE" ]; then
case ${MODE,,?} in
0|1|2|3)
;;
s*)
MODE=0
;;
c*)
MODE=1
;;
*)
echo "ERROR: Invalid game mode: $MODE"
exit 1
;;
esac
sed -i "/gamemode\s*=/ c gamemode=$MODE" /data/server.properties
fi
fi
if [ -n "$OPS" -a ! -e ops.txt.converted ]; then
echo $OPS | awk -v RS=, '{print}' >> ops.txt
fi
if [ -n "$ICON" -a ! -e server-icon.png ]; then
echo "Using server icon from $ICON..."
# Not sure what it is yet...call it "img"
wget -q -O /tmp/icon.img $ICON
specs=$(identify /tmp/icon.img | awk '{print $2,$3}')
if [ "$specs" = "PNG 64x64" ]; then
mv /tmp/icon.img /data/server-icon.png
else
echo "Converting image to 64x64 PNG..."
convert /tmp/icon.img -resize 64x64! /data/server-icon.png
fi
fi
exec java $JVM_OPTS -jar $SERVER

View File

@@ -1,39 +1,8 @@
#!/bin/sh
case $VERSION in
LATEST)
export VERSION=`wget -O - https://s3.amazonaws.com/Minecraft.Download/versions/versions.json | jsawk -n 'out(this.latest.release)'`
;;
set -e
usermod --uid $UID minecraft
chown -R minecraft /data /start-minecraft
SNAPSHOT)
export VERSION=`wget -O - https://s3.amazonaws.com/Minecraft.Download/versions/versions.json | jsawk -n 'out(this.latest.snapshot)'`
;;
esac
exec sudo -E -u minecraft /start-minecraft
cd /data
if [ ! -e minecraft_server.$VERSION.jar ]; then
wget https://s3.amazonaws.com/Minecraft.Download/versions/$VERSION/minecraft_server.$VERSION.jar
fi
if [ ! -e server.properties ]; then
cp /tmp/server.properties .
fi
sed -i "/motd\s*=/ c motd=$MOTD" /data/server.properties
sed -i "/level-name\s*=/ c level-name=$LEVEL" /data/server.properties
if [ "$EULA" != "" -a ! -e /data/eula.txt ]; then
echo "# Generated via Docker on $(date)" > eula.txt
echo "eula=$EULA" >> eula.txt
else
echo ""
echo "Please accept the Minecraft EULA at"
echo " https://account.mojang.com/documents/minecraft_eula"
echo "by adding the following immediately after 'docker run':"
echo " -e EULA=TRUE"
echo ""
exit 1
fi
java $JVM_OPTS -jar minecraft_server.$VERSION.jar

16
titan-gremlin/Dockerfile Executable file
View File

@@ -0,0 +1,16 @@
FROM itzg/ubuntu-openjdk-7
MAINTAINER itzg
ENV TITAN_VERSION 0.5.4
RUN wget -q -O /tmp/titan.zip http://s3.thinkaurelius.com/downloads/titan/titan-$TITAN_VERSION-hadoop2.zip
RUN unzip -q /tmp/titan.zip -d /opt && rm /tmp/titan.zip
ENV TITAN_HOME /opt/titan-$TITAN_VERSION-hadoop2
WORKDIR $TITAN_HOME
VOLUME ["/conf","/data"]
ADD start-gremlin.sh /opt/start-gremlin.sh
CMD ["/opt/start-gremlin.sh"]

45
titan-gremlin/README.md Normal file
View File

@@ -0,0 +1,45 @@
Runs the Gremlin console from the Titan Graph Database's "all" distribution.
# Basic Usage
To start the Gremlin console with the default configuration files available:
docker run -it itzg/titan-gremlin
In order to adjust or further define property files to use within Gremlin,
attach a host directory to the container's `/conf` such as
docker run -it -v $(pwd)/conf:/conf itzg/titan-gremlin
After running once your host directory will be populated with the distribution-default
configuration files. Modify those or add to them and they will be available during
the next time you (re)start your container.
# Connecting to Cassandra and Elasticsearch Containers
First start containers for Cassandra and Elasticsearch, where the `--name` you choose
can be arbitrary or left off to use a generated name.
docker run -d --name gremlin-cass itzg/cassandra
docker run -d --name gremlin-es itzg/elasticsearch
Now start Gremlin with networking links to those containers with the aliases
* `--link <container>:cass`
* `--link <container>:es`
such as
docker run -it --rm --link gremlin-cass:cass --link gremlin-es:es itzg/titan-gremlin
and with that you can follow the
[Graph of the Gods example](http://s3.thinkaurelius.com/docs/titan/current/getting-started.html), such as
gremlin> GraphOfTheGodsFactory.load(g)
gremlin> saturn = g.V.has('name','saturn').next()
==>v[256]
gremlin> saturn.map()
==>name=saturn
==>age=10000
gremlin> saturn.in('father').in('father').name
==>hercules

62
titan-gremlin/start-gremlin.sh Executable file
View File

@@ -0,0 +1,62 @@
#!/bin/bash
args=
if [ $(ls /conf|wc -l) = 0 ]; then
cp -r $TITAN_HOME/conf/* /conf
fi
rm -f /tmp/titan.properties
if [ -n "$CASS_PORT_9160_TCP_ADDR" ]; then
shortcut=/tmp/titan.properties
cat >> /tmp/titan.properties <<END
storage.backend=cassandra
storage.hostname=$CASS_PORT_9160_TCP_ADDR
END
elif [ -n "$CASS_ADDR" ]; then
shortcut=/tmp/titan.properties
cat >> /tmp/titan.properties <<END
storage.backend=cassandra
storage.hostname=$CASS_ADDR
END
fi
esAddr=${ES_ENV_PUBLISH_AS:-${ES_PORT_9300_TCP_ADDR}}
if [ -n "$ES_CLUSTER" -o -n "$esAddr" ]; then
shortcut=/tmp/titan.properties
cat >> /tmp/titan.properties <<END
index.search.backend=elasticsearch
index.search.elasticsearch.client-only=true
END
if [ -n "$ES_CLUSTER" ]; then
cat >> /tmp/titan.properties <<END
index.search.elasticsearch.ext.cluster.name=$ES_CLUSTER
END
fi
if [ -n "$esAddr" ]; then
# strip off the port spec, if present
esAddr=$(echo $esAddr | cut -d: -f1)
cat >> /tmp/titan.properties <<END
index.search.hostname=$esAddr
END
fi
fi
if [ -n "$shortcut" ]; then
cat > /tmp/init.groovy <<END
g = TitanFactory.open('$shortcut')
println 'The graph \'g\' was opened using $shortcut'
END
args="$args /tmp/init.groovy"
fi
exec $TITAN_HOME/bin/gremlin.sh $args

7
ubuntu-openjdk-7/Dockerfile Normal file → Executable file
View File

@@ -2,9 +2,10 @@ FROM ubuntu:trusty
MAINTAINER itzg
ENV APT_GET_UPDATE 2014-07-19
ENV APT_GET_UPDATE 2015-07-16
RUN apt-get update
RUN apt-get install -y openjdk-7-jre-headless
RUN DEBIAN_FRONTEND=noninteractive \
apt-get -q -y install openjdk-7-jre-headless wget unzip \
&& apt-get clean
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64