Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 4be6b59

Browse files
authored
Merge pull request #86 from lolPants/master
Fix all the things
2 parents ff56871 + cbba5c5 commit 4be6b59

File tree

8 files changed

+29
-13
lines changed

8 files changed

+29
-13
lines changed

Docker/docker.lua

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,25 @@ function updateContainer(id,name,imageRepo,imageTag,state)
176176
else
177177
Containers[index] = container
178178
end
179+
180+
-- update hack
181+
-- when new containers are started, all old containers dissappear
182+
-- they're still running, but for some reason stop being displayed until they're updated
183+
-- this forces them to re-render in world
184+
LOG("New container detected: Refreshing all...")
185+
for i=1, table.getn(Containers)
186+
do
187+
LOG("Refreshing container '" .. Containers[i].name .. "'")
188+
189+
-- Display
190+
Containers[i]:display(Containers[i].running)
191+
192+
-- YES WE NEED TO DO IT TWICE
193+
-- The signs don't display correctly on first re-render
194+
-- Do it again to make signs work
195+
-- Look don't ask me why, but it works so ¯\_(ツ)_/¯
196+
Containers[i]:display(Containers[i].running)
197+
end
179198
end
180199

181200
--
@@ -290,4 +309,3 @@ end
290309
function OnWeatherChanging(World, Weather)
291310
return true, wSunny
292311
end
293-

Docker/json.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ function json.parse(str, pos, end_delim)
182182
end
183183
end
184184

185-
return json
185+
return json

Docker/log.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ function logTable (tbl, indent)
1616
print(formatting .. v)
1717
end
1818
end
19-
end
19+
end

Docker/update.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,3 @@ function updateSign(queue,x,y,z,line1,line2,line3,line4,delay)
123123
meta = {line1=line1,line2=line2,line3=line3,line4=line4}
124124
queue:newUpdate(UPDATE_SIGN, x, y, z, nil, meta, delay)
125125
end
126-

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@ FROM alpine:3.6 AS wget
22
RUN apk add --no-cache ca-certificates wget tar
33

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

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

15-
FROM golang:1.8 AS dockercraft
15+
FROM golang:1.9 AS dockercraft
1616
WORKDIR /go/src/github.com/docker/dockercraft
1717
COPY . .
1818
RUN go install
1919

2020
FROM debian:jessie
21+
RUN apt-get update; apt-get install -y ca-certificates
2122
COPY --from=dockercraft /go/bin/dockercraft /bin
2223
COPY --from=docker /bin/docker /bin
2324
COPY --from=cuberite /srv /srv

config/settings.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
; See: http://wiki.mc-server.org/doku.php?id=configure:settings.ini for further configuration help
44

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

1717
[Server]
18-
Description=MCServer - in C++!
18+
Description=Dockercraft!
1919
MaxPlayers=100
2020
HardcoreEnabled=0
2121
AllowMultiLogin=0
@@ -45,4 +45,3 @@ Plugin=Docker
4545
[DeadlockDetect]
4646
Enabled=1
4747
IntervalSec=20
48-

config/world/world.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,3 @@ LimitRadius=0
5555

5656
[Difficulty]
5757
WorldDifficulty=1
58-

setup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
const (
17-
downloadURL = "https://get.docker.com/builds/Linux/x86_64/docker-"
17+
downloadURL = "https://download.docker.com/linux/static/stable/x86_64/docker-"
1818
rcDownloadURL = "https://test.docker.com/builds/Linux/x86_64/docker-"
1919
)
2020

0 commit comments

Comments
 (0)