-
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
Showing
2 changed files
with
77 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,44 @@ | ||
name: containers | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to ghcr.io | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: tezwatch container | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: ./containers/tezos/Containerfile | ||
platforms: linux/amd64 | ||
build-args: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} ARCH=x64 | ||
tags: ghcr.io/tez-capital/tezos:latest | ||
push: true | ||
provenance: false | ||
|
||
- name: tezwatch container | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: ./containers/tezos/Containerfile | ||
platforms: linux/arm64 | ||
build-args: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} ARCH=arm64 | ||
tags: ghcr.io/tez-capital/tezos:latest | ||
push: true | ||
provenance: false |
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 @@ | ||
FROM docker.io/ubuntu:jammy | ||
|
||
ARG ARCH | ||
|
||
ENV TEZOS_USER=tezos \ | ||
TEZOS_HOME=/home/tezos \ | ||
TEZOS_BIN=/usr/local/bin \ | ||
TEZOS_SHARE=/usr/local/share/tezos \ | ||
REPO_API=https://api.github.com/repos/tez-capital/tezos/releases/latest | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl jq \ | ||
unzip \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN useradd -m -d ${TEZOS_HOME} -s /bin/bash ${TEZOS_USER} | ||
|
||
COPY scripts/docker/entrypoint.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
RUN LATEST_TAG=$(curl -s ${REPO_API} | jq -r .tag_name) && \ | ||
DOWNLOAD_URL="https://github.com/tez-capital/tezos/releases/download/${LATEST_TAG}/octez-all-${ARCH}.zip" && \ | ||
echo "Downloading ${DOWNLOAD_URL}" && \ | ||
curl -L -o octez.zip ${DOWNLOAD_URL} && \ | ||
unzip octez.zip -d ${TEZOS_BIN} && \ | ||
rm octez.zip | ||
|
||
USER ${TEZOS_USER} | ||
WORKDIR ${TEZOS_HOME} | ||
|
||
COPY ./scripts/ ${TEZOS_SHARE}/ | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |