-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0f2155e
Showing
24 changed files
with
2,680 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Set line endings to LF | ||
* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Docker CI | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '.gitignore' | ||
- 'README.md' | ||
schedule: | ||
- cron: '15 0 * * 0' | ||
env: | ||
BETA_CHANNEL: 24.04 | ||
STABLE_CHANNEL: 22.04 | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Docker | ||
env: | ||
DOCKER_USER: ${{secrets.DOCKER_USER}} | ||
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}} | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_TOKEN | ||
- name: Build 22.04 | ||
run: | | ||
docker build . --pull --build-arg OS_VERSION=${{env.STABLE_CHANNEL}} --tag bshp/ocie:latest --no-cache | ||
- name: Push 22.04 | ||
run: | | ||
docker tag bshp/ocie:latest bshp/ocie:${{env.STABLE_CHANNEL}} | ||
docker push bshp/ocie:latest | ||
docker push bshp/ocie:${{env.STABLE_CHANNEL}} | ||
- name: Build 24.04 | ||
run: | | ||
docker build . --pull --build-arg OS_VERSION=${{env.BETA_CHANNEL}} --tag bshp/ocie:beta --no-cache | ||
- name: Push 24.04 | ||
run: | | ||
docker tag bshp/ocie:beta bshp/ocie:${{env.BETA_CHANNEL}} | ||
docker push bshp/ocie:beta | ||
docker push bshp/ocie:${{env.BETA_CHANNEL}} | ||
- name: Build Apache Base | ||
run: | | ||
curl -L -X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: ${{secrets.WF_TOKEN}}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/bshp/apache2/actions/workflows/build.yml/dispatches \ | ||
-d '{"ref":"master"}' | ||
- name: Build Mantis | ||
run: | | ||
curl -L -X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: ${{secrets.WF_TOKEN}}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/bshp/mantis/actions/workflows/build.yml/dispatches \ | ||
-d '{"ref":"main"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.log | ||
.build | ||
*.tar | ||
*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# syntax=docker/dockerfile-upstream:master | ||
|
||
# Ubuntu Version, e.g 22.04 unquoted | ||
ARG OS_VERSION | ||
|
||
# Optional: Change Timezone | ||
ARG TZ=America/North_Dakota/Center | ||
|
||
FROM ubuntu:$OS_VERSION | ||
|
||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
ARG OS_VERSION | ||
ARG TZ | ||
|
||
ENV OCIE_HOME=/etc/ocie | ||
ENV OCIE_LIB=/usr/lib/ocie | ||
ENV OCIE_TYPES=${OCIE_LIB}/types | ||
|
||
# Add Ocie | ||
COPY --chown=root:root --chmod=0755 ./src/ ./ | ||
|
||
RUN <<-"EOD" bash | ||
set -eu; | ||
echo "Ocie: Setting up environment"; | ||
echo "OCIE_BIN=/usr/sbin" >> /etc/environment; | ||
echo "OCIE_HOME=${OCIE_HOME}" >> /etc/environment; | ||
echo "OCIE_LIB=${OCIE_LIB}" >> /etc/environment; | ||
echo "OCIE_TYPES=${OCIE_TYPES}" >> /etc/environment; | ||
echo "OS_BASE=${OS_VERSION}" >> /etc/environment; | ||
echo "OS_CODENAME=$(grep -o 'VERSION_CODENAME=.*' </etc/os-release | cut -f2 -d'=')" >> /etc/environment; | ||
echo "OS_IMAGE=ubuntu:${OS_VERSION}" >> /etc/environment; | ||
echo "OS_TIMEZONE=${TZ}" >> /etc/environment; | ||
echo "OS_VERSION=${OS_VERSION//.}" >> /etc/environment; | ||
echo ". /etc/environment" >> /etc/bash.bashrc; | ||
echo "Ocie: Setting up system"; | ||
echo "Ocie: Creating container account, [ ocie ]"; | ||
mkdir -p ${OCIE_HOME}/conf; | ||
useradd -d ${OCIE_HOME} -r -s /bin/bash ocie; | ||
install -d -m 0775 -o ocie -g ocie ${OCIE_HOME}; | ||
# Install base packages, timezone | ||
ocie --pkg "-base -upgrade" --timezone "-set ${TZ}" --clean "-base" --print; | ||
echo "Ocie: System setup complete"; | ||
EOD | ||
|
||
CMD ["/bin/bash"] |
Oops, something went wrong.