Skip to content

Commit

Permalink
v2.7 add linux/arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
happyman committed Sep 8, 2023
1 parent d1b25aa commit 7f77665
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:jammy
ENV TZ=Asia/Taipei TERM=linux
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt-get update && apt-get -y upgrade && \
apt-get -y install vim zip unzip curl wget git imagemagick pngquant gpsbabel proj-bin inkscape fonts-wqy-zenhei netcat \
img2pdf ghostscript php php-cli php-gd php-xml php-curl php-json php-mbstring php-zip && \
apt-get update && \
apt-get install -y ca-certificates vim zip unzip curl wget git imagemagick pngquant gpsbabel proj-bin inkscape fonts-wqy-zenhei netcat \
img2pdf ghostscript php php-cli php-gd php-xml php-curl php-json php-mbstring php-zip php-redis && \
sed -i -E 's/name="memory" value=".+"/name="memory" value="8GiB"/g' /etc/ImageMagick-6/policy.xml &&\
sed -i -E 's/name="map" value=".+"/name="map" value="8GiB"/g' /etc/ImageMagick-6/policy.xml &&\
sed -i -E 's/name="area" value=".+"/name="area" value="8GiB"/g' /etc/ImageMagick-6/policy.xml &&\
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ twmap base env, used by docker-twmap-cli

check Dockerfile for required packages.


check build.sh (amd64)
build-arm.sh (arm64)


```
build for amd64 and arm64
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=--
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx build --platform linux/aarch64,linux/amd64 -t happyman/docker-twmap-base:latest --push .
docker buildx build --platform linux/aarch64 -t happyman/docker-twmap-base:arm64-latest --push .
cd ../docker-twmap-cli
docker buildx build --platform linux/aarch64,linux/amd64 -t happyman/docker-twmap-cli:latest --push .
```
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.4
v2.7
2 changes: 2 additions & 0 deletions build-arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
docker buildx build --platform linux/aarch64 -t happyman/docker-twmap-base:arm64-`cat VERSION` -t happyman/docker-twmap-base:arm64-latest --push .
8 changes: 5 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
tag=happyman/docker-twmap-base:`cat VERSION`
docker build -t $tag -t happyman/docker-twmap-base:latest .
docker build -t $tag -t happyman/docker-twmap-base:latest --push .

# docker push
echo docker push $tag
echo docker push happyman/docker-twmap-base:latest
docker push $tag

# arm64
#docker buildx build --platform linux/aarch64 -t happyman/docker-twmap-base:arm64-`cat VERSION` -t happyman/docker-twmap-base:arm64-latest --push .
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker run -i --rm happyman/docker-twmap-base:arm64-latest identify -list format
docker run -i --rm happyman/docker-twmap-base:latest identify -list format

0 comments on commit 7f77665

Please sign in to comment.