Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #86 from lolPants/master
Browse files Browse the repository at this point in the history
Fix all the things
  • Loading branch information
dave-tucker authored Jun 18, 2018
2 parents ff56871 + cbba5c5 commit 4be6b59
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 13 deletions.
20 changes: 19 additions & 1 deletion Docker/docker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ function updateContainer(id,name,imageRepo,imageTag,state)
else
Containers[index] = container
end

-- update hack
-- when new containers are started, all old containers dissappear
-- they're still running, but for some reason stop being displayed until they're updated
-- this forces them to re-render in world
LOG("New container detected: Refreshing all...")
for i=1, table.getn(Containers)
do
LOG("Refreshing container '" .. Containers[i].name .. "'")

-- Display
Containers[i]:display(Containers[i].running)

-- YES WE NEED TO DO IT TWICE
-- The signs don't display correctly on first re-render
-- Do it again to make signs work
-- Look don't ask me why, but it works so ¯\_(ツ)_/¯
Containers[i]:display(Containers[i].running)
end
end

--
Expand Down Expand Up @@ -290,4 +309,3 @@ end
function OnWeatherChanging(World, Weather)
return true, wSunny
end

2 changes: 1 addition & 1 deletion Docker/json.lua
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ function json.parse(str, pos, end_delim)
end
end

return json
return json
2 changes: 1 addition & 1 deletion Docker/log.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ function logTable (tbl, indent)
print(formatting .. v)
end
end
end
end
1 change: 0 additions & 1 deletion Docker/update.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,3 @@ function updateSign(queue,x,y,z,line1,line2,line3,line4,delay)
meta = {line1=line1,line2=line2,line3=line3,line4=line4}
queue:newUpdate(UPDATE_SIGN, x, y, z, nil, meta, delay)
end

9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@ FROM alpine:3.6 AS wget
RUN apk add --no-cache ca-certificates wget tar

FROM wget AS docker
ARG DOCKER_VERSION=17.04.0-ce
RUN wget -qO- https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz | \
ARG DOCKER_VERSION=17.09.0-ce
RUN wget -qO- https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | \
tar -xvz --strip-components=1 -C /bin

FROM wget AS cuberite
ARG CUBERITE_BUILD=630
ARG CUBERITE_BUILD=905
WORKDIR /srv
RUN wget -qO- "https://builds.cuberite.org/job/Cuberite Linux x64 Master/${CUBERITE_BUILD}/artifact/Cuberite.tar.gz" |\
tar -xzf -

FROM golang:1.8 AS dockercraft
FROM golang:1.9 AS dockercraft
WORKDIR /go/src/github.com/docker/dockercraft
COPY . .
RUN go install

FROM debian:jessie
RUN apt-get update; apt-get install -y ca-certificates
COPY --from=dockercraft /go/bin/dockercraft /bin
COPY --from=docker /bin/docker /bin
COPY --from=cuberite /srv /srv
Expand Down
5 changes: 2 additions & 3 deletions config/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; See: http://wiki.mc-server.org/doku.php?id=configure:settings.ini for further configuration help

[Authentication]
Authenticate=0
Authenticate=1
AllowBungeeCord=0
Server=sessionserver.mojang.com
Address=/session/minecraft/hasJoined?username=%USERNAME%&serverId=%SERVERID%
Expand All @@ -15,7 +15,7 @@ UUIDToProfileServer=sessionserver.mojang.com
UUIDToProfileAddress=/session/minecraft/profile/%UUID%?unsigned=false

[Server]
Description=MCServer - in C++!
Description=Dockercraft!
MaxPlayers=100
HardcoreEnabled=0
AllowMultiLogin=0
Expand Down Expand Up @@ -45,4 +45,3 @@ Plugin=Docker
[DeadlockDetect]
Enabled=1
IntervalSec=20

1 change: 0 additions & 1 deletion config/world/world.ini
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ LimitRadius=0

[Difficulty]
WorldDifficulty=1

2 changes: 1 addition & 1 deletion setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
downloadURL = "https://get.docker.com/builds/Linux/x86_64/docker-"
downloadURL = "https://download.docker.com/linux/static/stable/x86_64/docker-"
rcDownloadURL = "https://test.docker.com/builds/Linux/x86_64/docker-"
)

Expand Down

0 comments on commit 4be6b59

Please sign in to comment.