Merge pull request #5 from pascal-zarrad/feature/cassandra
Add a Apache Cassandra image
This commit is contained in:
38
.github/workflows/cassandra.yml
vendored
Normal file
38
.github/workflows/cassandra.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: build cassandra
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 1"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- cassandra/**
|
||||
jobs:
|
||||
push:
|
||||
name: "yolks:cassandra_${{ matrix.tag }}"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
tag:
|
||||
- java8_python2
|
||||
- java11_python3
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
with:
|
||||
version: "v0.5.1"
|
||||
buildkitd-flags: --debug
|
||||
- uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
- uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./cassandra
|
||||
file: ./cassandra/${{ matrix.tag }}/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/parkervcp/yolks:cassandra_${{ matrix.tag }}
|
@@ -30,6 +30,11 @@ is tagged correctly.
|
||||
* `ghcr.io/parkervcp/yolks:alpine`
|
||||
* [debian](/oses/debian)
|
||||
* `ghcr.io/parkervcp/yolks:debian`
|
||||
### [Cassandra](/cassandra)
|
||||
* [`cassandra_java8_python27`](/cassandra/cassandra_java8_python2)
|
||||
* `ghcr.io/parkervcp/yolks:cassandra_java11_python2`
|
||||
* [`cassandra_java11_python3`](/cassandra/cassandra_java11_python3)
|
||||
* `ghcr.io/parkervcp/yolks:cassandra_java11_python3`
|
||||
### [Erlang](/erlang)
|
||||
* [`erlang22`](/erlang/22)
|
||||
* `ghcr.io/parkervcp/yolks:erlang_22`
|
||||
@@ -87,4 +92,4 @@ is tagged correctly.
|
||||
* `ghcr.io/parkervcp/installers:alpine`
|
||||
|
||||
* [`debian-install`](/installers/debian)
|
||||
* `ghcr.io/parkervcp/installers:debian`
|
||||
* `ghcr.io/parkervcp/installers:debian`
|
||||
|
33
cassandra/entrypoint.sh
Normal file
33
cassandra/entrypoint.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/ash
|
||||
|
||||
# Default the TZ environment variable to UTC.
|
||||
TZ=${TZ:-UTC}
|
||||
export TZ
|
||||
|
||||
# Set environment variable that holds the Internal Docker IP
|
||||
INTERNAL_IP=$(ip route get 1 | awk '{print $NF;exit}')
|
||||
export INTERNAL_IP
|
||||
|
||||
# Switch to the container's working directory
|
||||
cd /home/container || exit 1
|
||||
|
||||
# Print Python version
|
||||
if command -v python &> /dev/null
|
||||
then
|
||||
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mpython --version\n"
|
||||
python --version
|
||||
else
|
||||
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mpython3 --version\n"
|
||||
python3 --version
|
||||
fi
|
||||
|
||||
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
|
||||
# variable format of "${VARIABLE}" before evaluating the string and automatically
|
||||
# replacing the values.
|
||||
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")
|
||||
|
||||
# Display the command we're running in the output, and then execute it with the env
|
||||
# from the container itself.
|
||||
printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED"
|
||||
# shellcheck disable=SC2086
|
||||
exec env ${PARSED}
|
16
cassandra/java11_python3/Dockerfile
Normal file
16
cassandra/java11_python3/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM --platform=$BUILDPLATFORM adoptopenjdk/openjdk11:alpine-jre
|
||||
|
||||
LABEL author="Pascal Zarrad" maintainer="p.zarrad@outlook.de"
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
RUN apk add --update --no-cache python3 ca-certificates curl fontconfig git openssl sqlite tar tzdata \
|
||||
&& adduser -D -h /home/container container
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY ./../entrypoint.sh /entrypoint.sh
|
||||
CMD [ "/bin/ash", "/entrypoint.sh" ]
|
16
cassandra/java8_python2/Dockerfile
Normal file
16
cassandra/java8_python2/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM --platform=$BUILDPLATFORM adoptopenjdk/openjdk8:alpine-jre
|
||||
|
||||
LABEL author="Pascal Zarrad" maintainer="p.zarrad@outlook.de"
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
RUN apk add --update --no-cache python2 ca-certificates curl fontconfig git openssl sqlite tar tzdata \
|
||||
&& adduser -D -h /home/container container
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container
|
||||
WORKDIR /home/container
|
||||
|
||||
COPY ./../entrypoint.sh /entrypoint.sh
|
||||
CMD [ "/bin/ash", "/entrypoint.sh" ]
|
Reference in New Issue
Block a user