Skip to content

Commit

Permalink
arm64 image
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeTWC1984 committed Mar 7, 2024
1 parent a24992d commit a8fb2da
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker-arm64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docker Build

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Docker/arm64.dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
cronicle/edge:arm64
env:
DOCKER_USERNAME: ${{ secrets.DHUB_USER }}
DOCKER_PASSWORD: ${{ secrets.DHUB_TOKEN }}
31 changes: 31 additions & 0 deletions Docker/arm64.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

FROM arm64v8/alpine:3.19.1 as base
RUN apk add --no-cache bash nodejs tini
RUN apk add --no-cache bash nodejs tini util-linux bash openssl procps coreutils curl tar jq

FROM base as build
RUN apk add --no-cache npm
COPY . /build
WORKDIR /build
RUN ./bundle /dist --mysql --pgsql --s3 --lmdb

FROM base

# non root user for shell plugin
ARG CRONICLE_UID=1000
ARG CRONICLE_GID=1099
RUN addgroup cronicle --gid $CRONICLE_GID && adduser -D -h /opt/cronicle -u $CRONICLE_UID -G cronicle cronicle

COPY --from=build /dist /opt/cronicle

ENV PATH "/opt/cronicle/bin:${PATH}"
ENV CRONICLE_foreground=1
ENV CRONICLE_echo=1
ENV TZ=America/New_York

WORKDIR /opt/cronicle

# protect sensitive folders
RUN mkdir -p /opt/cronicle/data /opt/cronicle/conf && chmod 0700 /opt/cronicle/data /opt/cronicle/conf

ENTRYPOINT ["/sbin/tini", "--"]

0 comments on commit a8fb2da

Please sign in to comment.