Skip to content

Commit

Permalink
arm対応
Browse files Browse the repository at this point in the history
  • Loading branch information
Till0196 committed Jan 18, 2025
1 parent 8572874 commit 0683c98
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/build-sharelatex-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,24 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}

- name: sharelatex base image build (arm64 only)
if: ${{ matrix.platform == 'linux/arm64' }}
run: |
git clone https://github.com/overleaf/overleaf --depth 1
docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--progress=plain \
--file Dockerfile-base \
--pull \
--tag sharelatex/sharelatex-base:latest \
overleaf/server-ce
docker build \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--progress=plain \
--file Dockerfile \
--tag sharelatex/sharelatex:latest \
overleaf/server-ce
- name: Build and push
id: build
uses: docker/build-push-action@v5
Expand Down
10 changes: 9 additions & 1 deletion sharelatex/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
FROM sharelatex/sharelatex:5
ARG TARGETARCH

# x86_64の場合、DockerHubからベースイメージを利用
FROM sharelatex/sharelatex:5 AS base-amd64

# arm64の場合、DockerHubにarm64向けイメージが存在しないため事前にビルドしたベースイメージを利用
FROM sharelatex/sharelatex:latest AS base-arm64

# アーキテクチャに応じてベースイメージを選択
FROM base-${TARGETARCH}

COPY --from=registry.gitlab.com/islandoftex/images/texlive:latest /usr/local/texlive /usr/local/texlive

Expand Down

0 comments on commit 0683c98

Please sign in to comment.