Skip to content

Commit

Permalink
debian and other updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxpiper committed Jul 8, 2024
1 parent 3373e4a commit c4fdca1
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push (debian)
id: docker_build_debian
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: ./debian.Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ushahidi/debian:buster-dockerize
tags: ushahidi/debian:bullseye-dockerize

- name: Build and push (alpine)
id: docker_build_alpine
Expand All @@ -40,4 +40,4 @@ jobs:
file: ./alpine.Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ushahidi/debian:3.12-dockerize
tags: ushahidi/alpine:3.12-dockerize
50 changes: 41 additions & 9 deletions debian.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
FROM debian:buster
FROM debian:bullseye

ENV DOCKERIZE_VERSION=v0.6.1 \
DOCKERIZE_TEMPLATE_DIR=/tmpl
ARG TARGETPLATFORM
ARG TARGETARCH

LABEL platform="$TARGETPLATFORM"
LABEL arch="$TARGETARCH"

ENV DOCKERIZE_VERSION=v0.7.0 \
DOCKERIZE_TEMPLATE_DIR=/tmpl \
S6_OVERLAY_VERSION=v3.2.0.0

RUN apt-get update && \
apt-get install -y curl findutils && \
curl -L https://github.com/jwilder/dockerize/releases/download/${DOCKERIZE_VERSION}/dockerize-linux-amd64-${DOCKERIZE_VERSION}.tar.gz | \
tar -C /usr/local/bin -xzv && \
apt-get install -y cron xz-utils curl findutils && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN case "${TARGETPLATFORM}" in \
"linux/amd64") S6_ARCH=x86_64 ;; \
"linux/arm64") S6_ARCH=aarch64 ;; \
"linux/arm/v7") S6_ARCH=armhf ;; \
"linux/arm/v6") S6_ARCH=arm ;; \
"linux/386") S6_ARCH=i686 ;; \
esac && \
curl -L https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz | \
tar -C / -xJv && \
case "${TARGETPLATFORM}" in \
"linux/amd64") DOCKERIZE_ARCH=amd64 ;; \
"linux/arm64") DOCKERIZE_ARCH=armhf ;; \
"linux/arm/v7") DOCKERIZE_ARCH=armhf ;; \
"linux/arm/v6") DOCKERIZE_ARCH=armel ;; \
"linux/386") DOCKERIZE_ARCH=386 ;; \
esac && \
curl -L https://github.com/jwilder/dockerize/releases/download/${DOCKERIZE_VERSION}/dockerize-linux-${DOCKERIZE_ARCH}-${DOCKERIZE_VERSION}.tar.gz | \
tar -C /usr/local/bin -xzv

# Add utilities for Cascading Entrypoint Scripts
# To be deprecated: substituted by s6-overlay
ENV DOCKERCES_MANAGE_UTIL=/manage.CES.sh \
DOCKERCES_ENTRYPOINT_CHAIN=/entrypoints.CES \
DOCKERCES_ENDPOINT_FILE=/endpoint.CES \
Expand All @@ -21,6 +46,13 @@ RUN ln -s /entrypoint.CES.sh $DOCKERCES_MANAGE_UTIL
# Set up Cacading Entrypoint Scripts as master entrypoint
ENTRYPOINT [ "/bin/bash", "/entrypoint.CES.sh" ]

# Add dockerize entrypoint
COPY /entrypoint.dockerize.sh /
RUN $DOCKERCES_MANAGE_UTIL add /entrypoint.dockerize.sh
# Add dockerize initializer
COPY /init.dockerize.sh /
RUN $DOCKERCES_MANAGE_UTIL add /init.dockerize.sh

# TODO to introduce s6 overlay
# Add services
# ADD services.d/ /etc/services.d/

# Set s6-overlay as the CES endpoint
# RUN $DOCKERCES_MANAGE_UTIL endpoint /init
File renamed without changes.
3 changes: 3 additions & 0 deletions services.d/cron/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/execlineb -P

cron -f

0 comments on commit c4fdca1

Please sign in to comment.