Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build arm image #58

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/publish_docker_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: planetariumhq/world-boss-service:git-${{ github.sha }}
- name: Build and push multi-arch Docker image
run: |
docker buildx build --platform linux/amd64,linux/arm64 \
-t planetariumhq/world-boss-service:git-${{ github.sha }} \
--build-arg COMMIT=git-${{ github.sha }} \
--push .
18 changes: 18 additions & 0 deletions Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.10.8-bullseye

ARG POETRY_VERSION=1.2.2

RUN apt-get update
RUN apt-get install -y postgresql-client vim jq

# Set up poetry
RUN pip install -U pip "poetry==${POETRY_VERSION}"
RUN poetry config virtualenvs.create false

COPY ./world_boss /app/world_boss
COPY pyproject.toml /app
COPY poetry.lock /app
COPY alembic.ini /app

WORKDIR /app
RUN poetry install --no-root --no-dev
18 changes: 18 additions & 0 deletions Dockerfile.arm64v8
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.10.8-bullseye

ARG POETRY_VERSION=1.2.2

RUN apt-get update
RUN apt-get install -y postgresql-client vim jq

# Set up poetry
RUN pip install -U pip "poetry==${POETRY_VERSION}"
RUN poetry config virtualenvs.create false

COPY ./world_boss /app/world_boss
COPY pyproject.toml /app
COPY poetry.lock /app
COPY alembic.ini /app

WORKDIR /app
RUN poetry install --no-root --no-dev
Loading