Skip to content

Commit

Permalink
Changed dockerfile to pull the jar file, and moved away from deprecat…
Browse files Browse the repository at this point in the history
…ed java image, also added example of Docker-compose with custom servers.
  • Loading branch information
AndrewLugg committed Feb 22, 2021
1 parent ddb359c commit bd00d14
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docker/raspberry-pi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM hypriot/rpi-java
FROM arm32v7/openjdk:8
RUN mkdir /brc
COPY BedrockConnect-1.0-SNAPSHOT.jar /brc
ADD https://github.com/Pugmatt/BedrockConnect/releases/latest/download/BedrockConnect-1.0-SNAPSHOT.jar /brc
WORKDIR /brc
EXPOSE 19132/udp
CMD ["java", "-Xms1G", "-Xmx1G", "-jar", "BedrockConnect-1.0-SNAPSHOT.jar", "nodb=true"]
CMD ["java", "-Xms1G", "-Xmx1G", "-jar", "BedrockConnect-1.0-SNAPSHOT.jar","nodb=true", "custom_servers=/brc/custom_servers.json"]
18 changes: 17 additions & 1 deletion docker/raspberry-pi/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# BedrockConnect on Docker on Raspberry Pi

- Put the `Dockerfile` and the `BedrockConnect-1.0-SNAPSHOT.jar` in one directory
- Grab the `Dockerfile`
- Configure the `CMD` line in the `Dockerfile` to fit your needs
- run `docker build -t bedrock-connect .`
- run `docker run --name "bedrock-c" -d --restart always -p 19132:19132/udp bedrock-connect`

# Docker compose example
```
bedrock-connect:
container_name: bedrock-connect
build:
context: /home/pi/BedrockConnect/docker/raspberrypi
dockerfile: ./Dockerfile
volumes:
- /home/pi/BedrockConnect/docker/raspberrypi/custom_servers.json:/brc/custom_servers.json
ports:
- 19132:19132/udp
restart: unless-stopped
```

Replace "/home/pi/BedrockConnect/docker/raspberrypi" with the location of the Dockerfile, and custom_servers.json.

0 comments on commit bd00d14

Please sign in to comment.