Skip to content

Commit

Permalink
chore: TZ/LANG 設定 6098
Browse files Browse the repository at this point in the history
  • Loading branch information
mickamy committed Jan 1, 2024
1 parent a5e2dfa commit 4c02e3c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
17 changes: 15 additions & 2 deletions docker/app/ruby/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
FROM showwin/ishocon2_app_base:latest
ENV APP_LANG 'Ruby'

# Ruby のインストール
# TZ の設定
ENV TZ Asia/Tokyo

RUN sudo apt-get update
RUN sudo apt-get install -y ruby-dev libmysqlclient-dev && \

# 日本語の設定
RUN sudo apt-get install -y language-pack-ja && \
sudo update-locale LANG=ja_JP.UTF-8 && \
sudo rm -rf /var/lib/apt/lists/*
ENV LANG="ja_JP.UTF-8" \
LANGUAGE="ja_JP:ja" \
LC_ALL="ja_JP.UTF-8"

# Ruby のインストール
RUN sudo apt-get update && \
sudo apt-get install -y ruby-dev libmysqlclient-dev && \
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
RUN PATH="$HOME/.rbenv/bin:$PATH" && \
eval "$(rbenv init -)" && \
Expand Down
15 changes: 14 additions & 1 deletion docker/benchmarker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ FROM ubuntu:18.04
RUN sudo apt-get update
RUN apt-get install -y wget

# TZ の設定
ENV TZ Asia/Tokyo

# 日本語の設定
RUN sudo apt-get install -y language-pack-ja && \
sudo update-locale LANG=ja_JP.UTF-8 && \
sudo rm -rf /var/lib/apt/lists/*
ENV LANG="ja_JP.UTF-8" \
LANGUAGE="ja_JP:ja" \
LC_ALL="ja_JP.UTF-8"

# Go のインストール
RUN wget -q https://dl.google.com/go/go1.13.15.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.13.15.linux-amd64.tar.gz
Expand All @@ -14,7 +25,9 @@ ENV PATH $PATH:$GOROOT/bin
# MySQL のインストール
RUN ["/bin/bash", "-c", "debconf-set-selections <<< 'mysql-server mysql-server/root_password password ishocon'"]
RUN ["/bin/bash", "-c", "debconf-set-selections <<< 'mysql-service mysql-server/mysql-apt-config string 4'"]
RUN apt-get install -y mysql-server

RUN sudo apt-get update && \
apt-get install -y mysql-server

COPY admin/ /root/admin/

Expand Down
19 changes: 19 additions & 0 deletions note.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,23 @@ docker exec -i ishocon2-bench-1 sh -c "./benchmark --ip app:443"
~/ghq/github.com/mickamy/ISHOCON2 imp1* 1m 2s
```

- Locale/TZ 設定

```
❯ make bench
docker exec -i ishocon2-bench-1 sh -c "./benchmark --ip app:443"
2024/01/01 23:34:15 Start GET /initialize
2024/01/01 23:34:15 期日前投票を開始します
2024/01/01 23:35:03 期日前投票が終了しました
2024/01/01 23:35:03 投票を開始します Workload: 3
2024/01/01 23:35:50 投票が終了しました
2024/01/01 23:35:50 投票者が結果を確認しています
2024/01/01 23:36:05 投票者の感心がなくなりました
2024/01/01 23:36:05 {"score": 6098, "success": 5474, "failure": 0}
~/ghq/github.com/mickamy/ISHOCON2 imp1* 1m 51s
```

TZ 設定できてない :pieng:


0 comments on commit 4c02e3c

Please sign in to comment.