- improve devcontainer setup
- add openweather web scraper module
This commit is contained in:
10
.devcontainer/Dockerfile
Normal file
10
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM python:3.9-slim-bullseye
|
||||
WORKDIR /usr/src/app
|
||||
RUN apt-get -y update && apt-get install -yqq dos2unix chromium chromium-driver \
|
||||
libxi6 libgconf-2-4 python3-selenium \
|
||||
tzdata git
|
||||
RUN git config --global --add safe.directory /usr/src/app
|
||||
RUN python3 -m pip install --upgrade pip
|
||||
RUN python3 -m pip install --user virtualenv
|
||||
ENV TZ=Europe/Berlin
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
@@ -1,18 +1,22 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json.
|
||||
{
|
||||
"name": "Inkycal-dev",
|
||||
"image": "python:3.9-bullseye",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile"
|
||||
},
|
||||
|
||||
// This is the settings.json mount
|
||||
"mounts": ["source=/c/temp/settings_test.json,target=/boot/settings.json,type=bind,consistency=cached"],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
"postCreateCommand": "pip3 install --upgrade pip && pip3 install --user -r requirements.txt",
|
||||
"postCreateCommand": "chmod +x ./.devcontainer/postCreate.sh && ./.devcontainer/postCreate.sh",
|
||||
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python"
|
||||
"ms-python.python",
|
||||
"ms-python.black-formatter",
|
||||
"ms-azuretools.vscode-docker"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
2
.devcontainer/postCreate.sh
Normal file
2
.devcontainer/postCreate.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
source ./venv/Scripts/activate && pip3 install --upgrade pip && pip3 install --user -r requirements.txt
|
Reference in New Issue
Block a user