Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Image Build/Publish Automation #274

Open
ashanrath opened this issue Feb 9, 2022 · 5 comments
Open

Docker Image Build/Publish Automation #274

ashanrath opened this issue Feb 9, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@ashanrath
Copy link
Contributor

ashanrath commented Feb 9, 2022

Is your feature request related to a problem? Please describe.
Currently need to perform the docker image build locally. This can be time consuming on low power devices such as RPi.

Describe the solution you'd like
Configure docker auto-builds within the git project.

Describe alternatives you've considered
N/A

Additional context
Possibly consider publishing the image to github as an automated workflow.

@ashanrath ashanrath added the enhancement New feature or request label Feb 9, 2022
@ashanrath ashanrath changed the title Image Build/Publish Automation Docker Image Build/Publish Automation Feb 9, 2022
@ashanrath
Copy link
Contributor Author

@Pugmatt @AndrewLugg @MarcProe @SeniorHeld, tagging you as previous commits to the dockerfiles. I was considering replacing the two Dockerfile instances (standard and RPi) with a single file as a stepping stone for simplifying build automation.

At the moment the only real differences are:

  • Standard: openjdk:11 and memory at 256MB
  • RPi: openjdk:8 and memory at 1GB

Was there a specific reason to use an older JDK for the RPi and less memory for the standard, or have they just fallen out of sync as they've been updated individually?

@AndrewLugg
Copy link
Contributor

AndrewLugg commented Apr 21, 2022

I have previously found that the openjdk:11 only has ARM64. The default RaspberryPi OS is still 32 bit, so needs ARM32 image. They do offer a 64 bit OS for RPi, but it isn't the default. There may be images of openJDK:11 with ARM32 as well, but I didn't find it when I was tweaking the images.

Although looking at it now, this commit has broken it for 32bit RPi cda9281 as the default openJDK doesn't have any 32 bit images. The main docker image has only 64 bit. You could merge the 64 bit RPi and Standard, and have a seperate one for 32bit RPi, unless there is a image that has all architecture. (this image has one for all arch's https://hub.docker.com/r/adoptopenjdk/openjdk11/, but I haven't tested it)

As for the memory level, I don't know why it was set to 1GB over 256MB.

@hTobi02
Copy link
Contributor

hTobi02 commented Apr 21, 2022

Hello,
First:
with the following Dockerfile you should be able to run Bedrock-Connect also from an ARM32 machine:

FROM adoptopenjdk/openjdk11:ubuntu-jre
RUN mkdir -p /docker/brc
ADD https://github.com/Pugmatt/BedrockConnect/releases/latest/download/BedrockConnect-1.0-SNAPSHOT.jar /docker/brc
WORKDIR /docker/brc
EXPOSE 19132/udp
CMD ["java", "-Xms256M", "-Xmx256M", "-jar", "BedrockConnect-1.0-SNAPSHOT.jar", "nodb=true"]

It is also extremely small (88-98MB), as you can see here (Docker Hub).

Second:
I absolutely don't know, why one Dockerfile has 1GB and the other one has only 256MB. But 256MB should be plenty to run Bedrock-Connect.

@ashanrath
Copy link
Contributor Author

Hello,
First:
with the following Dockerfile you should be able to run Bedrock-Connect also from an ARM32 machine:

FROM adoptopenjdk/openjdk11:ubuntu-jre
RUN mkdir -p /docker/brc
ADD https://github.com/Pugmatt/BedrockConnect/releases/latest/download/BedrockConnect-1.0-SNAPSHOT.jar /docker/brc
WORKDIR /docker/brc
EXPOSE 19132/udp
CMD ["java", "-Xms256M", "-Xmx256M", "-jar", "BedrockConnect-1.0-SNAPSHOT.jar", "nodb=true"]

It is also extremely small (88-98MB), as you can see here (Docker Hub).

Second:
I absolutely don't know, why one Dockerfile has 1GB and the other one has only 256MB. But 256MB should be plenty to run Bedrock-Connect.

That's great, thanks for sharing. I'll test out a unified file on a few devices then add it to a PR next week.

@MarcProe
Copy link
Contributor

@Pugmatt @AndrewLugg @MarcProe @SeniorHeld, tagging you as previous commits to the dockerfiles. I was considering replacing the two Dockerfile instances (standard and RPi) with a single file as a stepping stone for simplifying build automation.

No specific reason for the 1G or the v8 in the initial commit as far as I recall. It just worked at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants