Created
March 30, 2022 08:30
-
-
Save kilfu0701/7fbb45dc4de907677d6da9abbc7ee01a to your computer and use it in GitHub Desktop.
Dockerfile and docker-compose.yml by SAMBA volumes
This file contains 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
version: '3.5' | |
services: | |
dev1: | |
restart: always | |
build: . | |
container_name: 'dev1' | |
working_dir: /home | |
deploy: | |
resources: | |
limits: | |
memory: 64G | |
tty: true | |
command: tail -f /dev/null | |
volumes: | |
- nas_disk:/home | |
volumes: | |
nas_disk: | |
driver: local | |
driver_opts: | |
type: 'cifs' | |
o: 'file_mode=0777,dir_mode=0777,rw,username=guest,password=passWord' | |
device: '//192.168.1.2/hdd' |
This file contains 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 python:3.8 | |
USER root | |
RUN apt-get update | |
RUN apt-get -y install locales && \ | |
localedef -f UTF-8 -i ja_JP ja_JP.UTF-8 | |
ENV LANG ja_JP.UTF-8 | |
ENV LANGUAGE ja_JP:ja | |
ENV LC_ALL ja_JP.UTF-8 | |
ENV TZ JST-9 | |
ENV TERM xterm | |
RUN apt-get install -y vim less | |
RUN pip install --upgrade pip | |
RUN pip install --upgrade setuptools | |
RUN apt-get -y install git | |
RUN python -m pip install jupyterlab | |
RUN useradd --create-home appuser1 | |
RUN useradd --create-home appuser2 | |
RUN useradd --create-home appuser3 | |
RUN useradd --create-home appuser4 | |
RUN echo "\ | |
getent passwd | grep /home/ | cut -d ':' -f 1 | while read user ; do \n\ | |
mkhomedir_helper \"\$user\" \n\ | |
done \ | |
" >> /etc/bash.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
build images
enter into container with
$user
docker-compose exec --user appuser1 dev1 /bin/bash