mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Added support for Java 7
This commit is contained in:
parent
28b7afda15
commit
a94af56566
3
.github/workflows/build-multiarch.yml
vendored
3
.github/workflows/build-multiarch.yml
vendored
@ -5,6 +5,7 @@ on:
|
||||
- master
|
||||
- "*-multiarch"
|
||||
- "multiarch*"
|
||||
- java7
|
||||
- java8-openj9
|
||||
- java11*
|
||||
- java16*
|
||||
@ -66,7 +67,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2.6.1
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
platforms: linux/amd64,linux/arm/v7
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
# ensure latest base image is used
|
||||
|
39
Dockerfile
39
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM adoptopenjdk:16-jre
|
||||
FROM openjdk:7-jre
|
||||
|
||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||
|
||||
@ -6,7 +6,6 @@ RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
gosu \
|
||||
sudo \
|
||||
net-tools \
|
||||
curl wget \
|
||||
@ -22,6 +21,42 @@ RUN apt-get update \
|
||||
ttf-dejavu \
|
||||
&& apt-get clean
|
||||
|
||||
# Procedure from https://github.com/tianon/gosu/blob/master/INSTALL.md#from-debian
|
||||
ENV GOSU_VERSION 1.14
|
||||
RUN set -eux; \
|
||||
# save list of currently installed packages for later so we can clean up
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends ca-certificates wget; \
|
||||
if ! command -v gpg; then \
|
||||
apt-get install -y --no-install-recommends gnupg2 dirmngr; \
|
||||
elif gpg --version | grep -q '^gpg (GnuPG) 1\.'; then \
|
||||
# "This package provides support for HKPS keyservers." (GnuPG 1.x only)
|
||||
apt-get install -y --no-install-recommends gnupg-curl; \
|
||||
fi; \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
\
|
||||
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
|
||||
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
|
||||
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
|
||||
\
|
||||
# verify the signature
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
|
||||
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
|
||||
command -v gpgconf && gpgconf --kill all || :; \
|
||||
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
|
||||
\
|
||||
# clean up fetch dependencies
|
||||
apt-mark auto '.*' > /dev/null; \
|
||||
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||||
\
|
||||
chmod +x /usr/local/bin/gosu; \
|
||||
# verify that the binary works
|
||||
gosu --version; \
|
||||
gosu nobody true
|
||||
|
||||
RUN addgroup --gid 1000 minecraft \
|
||||
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user