feat: Dockerイメージでmysql-client 8.xを使用できるように修正
This commit is contained in:
parent
c7c5eade7b
commit
2682824863
@ -1,28 +1,40 @@
|
||||
FROM python:3.9
|
||||
FROM python:3.9-bullseye
|
||||
|
||||
ENV TZ="Asia/Tokyo"
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY Pipfile Pipfile.lock ./
|
||||
# apt mysqlパッケージのdpkg次のコマンド注入用
|
||||
COPY mysql_dpkg_selection.txt ./
|
||||
# 必要なパッケージインストール
|
||||
RUN apt update && apt install -y less vim curl wget gzip unzip sudo lsb-release
|
||||
|
||||
# # mysqlをインストール
|
||||
RUN \
|
||||
wget https://dev.mysql.com/get/mysql-apt-config_0.8.25-1_all.deb && \
|
||||
dpkg -i mysql-apt-config_0.8.25-1_all.deb < mysql_dpkg_selection.txt && \
|
||||
apt update && \
|
||||
apt install -y mysql-client
|
||||
|
||||
# aws cli v2 のインストール
|
||||
RUN \
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
|
||||
unzip awscliv2.zip && \
|
||||
sudo ./aws/install
|
||||
|
||||
# python関連のライブラリインストール
|
||||
RUN \
|
||||
apt update -y && \
|
||||
# パッケージのセキュリティアップデートのみを適用するコマンド
|
||||
apt install -y unattended-upgrades && \
|
||||
unattended-upgrades && \
|
||||
pip install --upgrade pip wheel setuptools && \
|
||||
pip install pipenv --no-cache-dir && \
|
||||
pipenv install --system --deploy && \
|
||||
pip uninstall -y pipenv virtualenv-clone virtualenv
|
||||
|
||||
# mysql-clientと必要なパッケージインストール
|
||||
RUN apt install -y less vim curl unzip sudo default-mysql-client
|
||||
|
||||
# aws cli v2 のインストール
|
||||
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
RUN unzip awscliv2.zip
|
||||
RUN sudo ./aws/install
|
||||
# パッケージのセキュリティアップデートのみを適用するコマンドを実行
|
||||
RUN \
|
||||
apt install -y unattended-upgrades && \
|
||||
unattended-upgrades
|
||||
|
||||
COPY src ./src
|
||||
COPY entrypoint.py entrypoint.py
|
||||
COPY entrypoint.py entrypoint.py
|
||||
|
||||
CMD ["python", "entrypoint.py"]
|
||||
|
||||
3
ecs/jskult-dbdump/mysql_dpkg_selection.txt
Normal file
3
ecs/jskult-dbdump/mysql_dpkg_selection.txt
Normal file
@ -0,0 +1,3 @@
|
||||
1
|
||||
1
|
||||
4
|
||||
Loading…
x
Reference in New Issue
Block a user