Skip to content

Commit

Permalink
Set TZ in "latex-make" image
Browse files Browse the repository at this point in the history
  • Loading branch information
atton committed Jun 8, 2020
1 parent 2e14df2 commit 427f143
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-and-push.yml
Expand Up @@ -8,6 +8,7 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Clone repository
run: git clone https://github.com/atton/dockerfiles
- name: Build and Publish Images
run: sh build.sh ${{ secrets.DOCKER_PASSWORD }}
run: sh dockerfiles/build.sh ${{ secrets.DOCKER_PASSWORD }}
6 changes: 3 additions & 3 deletions build.sh
@@ -1,17 +1,17 @@
#!/bin/sh
cd `dirname $0`

buildopt='--compress --pull'
git show --name-only

if [ -n "$1" ]; then docker login -u atton -p $1; fi
for name in `ls`; do
if [ ! -d $name ]; then continue; fi
if [ ! -f $name/Dockerfile ]; then continue; fi

tag="atton/$name"
docker build $buildopt -t $tag $name
docker build --compress --pull -t $tag $name

git diff-tree --no-commit-id --name-only -r HEAD | grep $name/ >/dev/null 2>&1
git diff-tree --no-commit-id --name-only -r master | grep "$name/" >/dev/null 2>&1
if [ $? -eq 0 ]; then docker push $tag; fi
done
if [ -n "$1" ]; then docker logout; fi
6 changes: 2 additions & 4 deletions latex-make/Dockerfile
@@ -1,9 +1,7 @@
FROM paperist/alpine-texlive-ja

RUN apk add --no-cache make tzdata
RUN cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && echo "Asia/Tokyo" > /etc/timezone
RUN wget http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh && sh update-tlmgr-latest.sh -- --upgrade && rm update-tlmgr-latest.sh
RUN tlmgr install tracklang
RUN apk add --no-cache make tzdata && cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && echo "Asia/Tokyo" > /etc/timezone
RUN wget http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh && sh update-tlmgr-latest.sh -- --upgrade && rm update-tlmgr-latest.sh && tlmgr install tracklang

ADD make.sh /root/make.sh
ENTRYPOINT ["sh", "/root/make.sh"]
3 changes: 1 addition & 2 deletions latex-make/make.sh
Expand Up @@ -5,6 +5,5 @@ if [ ! -f Makefile ]; then
exit
fi

# UTC to JST
export SOURCE_DATE_EPOCH=`echo "($(date +'%s') + 9 * 60 * 60)" | bc`
export TZ=/etc/localtime
make

0 comments on commit 427f143

Please sign in to comment.