Last active
September 6, 2022 00:39
-
-
Save nogajun/902b74f2f41e8c2a3451834899bf8f7d to your computer and use it in GitHub Desktop.
For web app creation class. used from dev container on Visual studio code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:bookworm | |
LABEL version="1.2" | |
LABEL maintainer="[email protected]" | |
LABEL description="For web app creation class. used from dev container on Visual studio code." | |
# 必要なパッケージをインストール | |
RUN apt-get -y update && \ | |
apt-get -y full-upgrade && \ | |
apt-get -y install apt-utils locales sudo python3-all python3-pip python3-venv python-is-python3 python3-yaml bash-completion wget curl jq git task-japanese | |
# 日本語ロケール(ja_JP.UTF-8)を追加 | |
ARG USER_LOCALE=ja_JP.UTF-8 | |
RUN sed -i -e "s/^# \(${USER_LOCALE}\)/\1/g" /etc/locale.gen && \ | |
echo "LANG=${USER_LOCALE}" > /etc/default/locale && \ | |
dpkg-reconfigure --frontend=noninteractive locales && \ | |
update-locale LANG=${USER_LOCALE} | |
ENV LANG ja_JP.UTF-8 | |
ENV LANGUAGE ja | |
# bash_completionにpipのオプション補完を追加 | |
RUN mkdir -p /etc/bash_completion.d/ && \ | |
wget -O /etc/bash_completion.d/pip https://raw.githubusercontent.com/ekalinin/pip-bash-completion/master/pip | |
# dockerユーザーとグループを追加 | |
ARG UID=1000 | |
ARG GID=1000 | |
RUN groupadd -g ${GID} docker && \ | |
useradd -u ${UID} -g ${GID} -s /bin/bash -m docker && \ | |
gpasswd -a docker docker | |
# dockerユーザーがsudoを使えるように設定 | |
RUN echo "docker ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/docker && \ | |
chmod 440 /etc/sudoers.d/docker | |
USER ${UID} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment