ARG _DEV_CONTAINERS_BASE_IMAGE=placeholder # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/python-3/.devcontainer/base.Dockerfile # [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster # Available images: https://mcr.microsoft.com/v2/vscode/devcontainers/python/tags/list FROM mcr.microsoft.com/vscode/devcontainers/python:0.203.5-3.10-bullseye AS dev_container_auto_added_stage_label # default envs ENV USERNAME="vscode" ENV TZ Europe/Berlin ENV PYTHONUNBUFFERED 1 ENV SHELL /bin/zsh # custom # WORKDIR /devcontainer RUN apt-get update --no-install-recommends \ # Install graphviz for prefect flow visualization && apt-get --yes install graphviz xdg-utils --no-install-recommends \ # Clean up && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* \ # save zsh history && SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.zsh_history" \ && mkdir /commandhistory \ && touch /commandhistory/.zsh_history \ && chown -R $USERNAME /commandhistory \ && echo $SNIPPET >> "/home/$USERNAME/.zshrc" USER ${USERNAME} # activate later # # install zsh powerlevel10k theme # RUN git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/custom/themes/powerlevel10k \ # && echo 'source $HOME/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc CMD [ "sleep", "infinity" ] FROM dev_container_feature_content_temp as dev_containers_feature_content_source FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage USER root COPY --from=dev_containers_feature_content_source /tmp/build-features/ /tmp/build-features/ ENV DOCKER_BUILDKIT=1 RUN cd /tmp/build-features/docker-from-docker_1 \ && chmod +x ./devcontainer-features-install.sh \ && ./devcontainer-features-install.sh ARG _DEV_CONTAINERS_IMAGE_USER=root USER $_DEV_CONTAINERS_IMAGE_USER LABEL devcontainer.metadata="[ \ {\"id\":\"docker-from-docker\",\"entrypoint\":\"/usr/local/share/docker-init.sh\",\"mounts\":[{\"source\":\"/var/run/docker.sock\",\"target\":\"/var/run/docker-host.sock\",\"type\":\"bind\"}],\"customizations\":{\"vscode\":{\"extensions\":[\"ms-azuretools.vscode-docker\"]}}}, \ {\"postCreateCommand\":\"sh /workspace/.devcontainer/post_create.sh\",\"customizations\":{\"vscode\":{\"extensions\":[\"amodio.find-related\",\"bastienboutonnet.vscode-dbt\",\"dorzey.vscode-sqlfluff\",\"eamodio.gitlens\",\"esbenp.prettier-vscode\",\"innoverio.vscode-dbt-power-user\",\"littlefoxteam.vscode-python-test-adapter\",\"ms-python.python\",\"ms-python.vscode-pylance\",\"ryu1kn.partial-diff\",\"spmeesseman.vscode-taskexplorer\",\"redhat.vscode-yaml\"],\"settings\":{\"editor.formatOnPaste\":false,\"editor.formatOnType\":false,\"editor.formatOnSave\":false,\"files.eol\":\"\\n\",\"files.encoding\":\"utf8\",\"python.defaultInterpreterPath\":\"/usr/local/bin/python\",\"python.formatting.provider\":\"black\",\"python.languageServer\":\"Pylance\",\"python.linting.enabled\":true,\"python.linting.pylintEnabled\":true,\"python.formatting.autopep8Path\":\"/usr/local/py-utils/bin/autopep8\",\"python.formatting.blackPath\":\"/usr/local/py-utils/bin/black\",\"python.formatting.yapfPath\":\"/usr/local/py-utils/bin/yapf\",\"python.linting.banditPath\":\"/usr/local/py-utils/bin/bandit\",\"python.linting.flake8Path\":\"/usr/local/py-utils/bin/flake8\",\"python.linting.mypyPath\":\"/usr/local/py-utils/bin/mypy\",\"python.linting.pycodestylePath\":\"/usr/local/py-utils/bin/pycodestyle\",\"python.linting.pydocstylePath\":\"/usr/local/py-utils/bin/pydocstyle\",\"python.linting.pylintPath\":\"/usr/local/py-utils/bin/pylint\",\"python.testing.pytestPath\":\"/usr/local/py-utils/bin/pytest\",\"python.testing.pytestEnabled\":true,\"pythonTestExplorer.testFramework\":\"pytest\",\"taskExplorer.enableAnsiconForAnt\":false,\"taskExplorer.enableAnt\":false,\"taskExplorer.enableAppPublisher\":false,\"taskExplorer.enableBash\":false,\"taskExplorer.enableBatch\":false,\"taskExplorer.enableComposer\":false,\"taskExplorer.enableGradle\":false,\"taskExplorer.enableGrunt\":false,\"taskExplorer.enableGulp\":false,\"taskExplorer.enableMake\":false,\"taskExplorer.enableMaven\":false,\"taskExplorer.enableNpm\":false,\"taskExplorer.enableNsis\":false,\"taskExplorer.enablePerl\":false,\"taskExplorer.enablePipenv\":false,\"taskExplorer.enablePowershell\":false,\"taskExplorer.enablePython\":false,\"taskExplorer.enableRuby\":false,\"taskExplorer.enableTsc\":false,\"taskExplorer.enableWorkspace\":true,\"todo-tree.general.tags\":[\"BUG\",\"FIXME\",\"TODO\",\"--#@todo#\"],\"zenMode.hideTabs\":false,\"todo-tree.highlights.useColourScheme\":true,\"workbench.colorCustomizations\":{\"editorHint.foreground\":\"#ff0000\",\"editorHint.border\":\"#00ff66\"},\"[json]\":{\"editor.quickSuggestions\":{\"strings\":true},\"editor.formatOnSave\":true},\"[sql]\":{\"editor.defaultFormatter\":\"dorzey.vscode-sqlfluff\"},\"[python]\":{\"editor.formatOnSave\":true,\"editor.formatOnType\":true},\"[yaml]\":{\"editor.insertSpaces\":true,\"editor.tabSize\":2,\"editor.autoIndent\":\"keep\",\"editor.quickSuggestions\":{\"other\":true,\"comments\":false,\"strings\":true},\"editor.formatOnSave\":true},\"findrelated.workspaceRulesets\":[{\"name\":\"sql\",\"rules\":[{\"pattern\":\"^(.*/)?models/(.*/)?(.+\\\\.sql)\$\",\"locators\":[\"**/compiled/**/\$3\"]},{\"pattern\":\"^(.*/)?compiled/(.*/)?(.+\\\\.sql)\$\",\"locators\":[\"**/run/**/\$3\"]},{\"pattern\":\"^(.*/)?run/(.*/)?(.+\\\\.sql)\$\",\"locators\":[\"**/models/**/\$3\"]}]}],\"findrelated.applyRulesets\":[\"sql\"],\"files.associations\":{\"**/dbt/**/*.sql\":\"jinja-sql\",\"**/target/**/*.sql\":\"sql\",\"**/dbt/**/*.yaml\":\"jinja-yaml\",\"**/dbt/**/*.yml\":\"jinja-yaml\",\"**/dbt/**/docs/**/*.md\":\"jinja-md\",\"**/dbt/*.yml\":\"yaml\",\"**/dbt/*.yaml\":\"yaml\"},\"editor.quickSuggestions\":{\"strings\":true},\"git.mergeEditor\":true}}},\"remoteUser\":\"vscode\",\"remoteEnv\":{\"DBT_PROFILES_DIR\":\"\${containerWorkspaceFolder}/dbt/profile\",\"DBT_PROJECT_DIR\":\"\${containerWorkspaceFolder}/dbt/iris\",\"DBTVAULT_SCALEFREE_PROJECT_DIR\":\"\${containerWorkspaceFolder}/dbt/dbt-public-release\",\"PREFECT__USER_CONFIG_PATH\":\"\${containerWorkspaceFolder}/prefect/profile/config.toml\",\"DEV_CONTAINER_WORKING_DIR\":\"\${containerWorkspaceFolder}\"}} \ ]"