Skip to content

Commit

Permalink
proj-inclusive/OpenFisca-Shibuya (725d65d, 2023/4/29)をコピー
Browse files Browse the repository at this point in the history
  • Loading branch information
SnoozingJellyfish committed Apr 30, 2023
0 parents commit fd13402
Show file tree
Hide file tree
Showing 168 changed files with 13,073 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM python:3.8-bullseye

RUN apt update && apt install -y \
git \
curl \
vim \
htop \
jq \
nkf

RUN curl -fsSL https://get.docker.com | sh

RUN curl -Ls https://deb.nodesource.com/setup_18.x | bash
RUN apt update && apt install -y nodejs

RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install --no-cache-dir \
autopep8 \
flake8

WORKDIR /app
COPY . /app

RUN make install
RUN make build

EXPOSE 30000
EXPOSE 50000

RUN useradd -m user

ARG NONROOT_USER=user
RUN echo "#!/bin/sh\n\
sudoIf() { if [ \"\$(id -u)\" -ne 0 ]; then sudo \"\$@\"; else \"\$@\"; fi }\n\
SOCKET_GID=\$(stat -c '%g' /var/run/docker.sock) \n\
if [ \"${SOCKET_GID}\" != '0' ]; then\n\
if [ \"\$(cat /etc/group | grep :\${SOCKET_GID}:)\" = '' ]; then sudoIf groupadd --gid \${SOCKET_GID} docker-host; fi \n\
if [ \"\$(id ${NONROOT_USER} | grep -E \"groups=.*(=|,)\${SOCKET_GID}\(\")\" = '' ]; then sudoIf usermod -aG \${SOCKET_GID} ${NONROOT_USER}; fi\n\
fi\n\
exec \"\$@\"" > /usr/local/share/docker-init.sh \
&& chmod +x /usr/local/share/docker-init.sh

ENTRYPOINT [ "/usr/local/share/docker-init.sh" ]
CMD [ "sleep", "infinity" ]
71 changes: 71 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/docker-existing-dockerfile
{
"name": "Dockerfile",

// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",

// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "./Dockerfile",

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [30000, 50000],

// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update && apt-get install -y curl",

// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
"runArgs": ["--init"],

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"overrideCommand": false,
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
},

// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "user",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"terminal.integrated.defaultProfile.linux": "bash",
"editor.formatOnSave": true,
"python.pythonPath": "/usr/local/bin/python",
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--ignore=D101,D107,D401,E128,E133,E251,E501,W503,D102,D200,D400"
],
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Args": [
"--ignore",
"D101,D107,D401,E128,E133,E251,E501,W503,D102,D200,D400",
"--max-line-length",
"150"
]
},
"extensions": [
"MS-CEINTL.vscode-language-pack-ja",
"wraith13.bracket-lens",
"vscode-icons-team.vscode-icons",
"oderwat.indent-rainbow",
"VisualStudioExptTeam.vscodeintellicode",
"mosapride.zenkaku",
"ms-python.python",
"ms-vsliveshare.vsliveshare",
"ms-azuretools.vscode-docker",
"esbenp.prettier-vscode"
]
}
}
}
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.devcontainer
.git
.github
.pylintrc
.vscode
dashboard
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Python builds

*.egg-info
*.pyc
build
dist
.venv
venv

# Editors

.project
.pydevproject
.settings
.spyderproject
.vscode

# OS stuff

.DS_Store
*~

Loading

0 comments on commit fd13402

Please sign in to comment.