forked from cronicle-edge/cronicle-edge
-
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
1 parent
a24992d
commit a8fb2da
Showing
2 changed files
with
64 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,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 }} |
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,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", "--"] |