Move devcontainer stuff to .devcontainer

This commit is contained in:
Matthias 2020-09-20 12:35:08 +00:00
parent cf85a178f3
commit 0a7b6f73c9
4 changed files with 27 additions and 27 deletions

22
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM freqtradeorg/freqtrade:develop
# Install dependencies
COPY requirements-dev.txt /freqtrade/
RUN apt-get update \
&& apt-get -y install git sudo vim \
&& apt-get clean \
&& pip install numpy --no-cache-dir \
# Install ALL dependencies
&& pip install -r requirements-dev.txt --no-cache-dir \
# Install documentation dependencies (to enable mkdocs)
&& pip install -r docs/requirements-docs.txt --no-cache-dir \
&& useradd -m ftuser \
&& mkdir -p /home/ftuser/.vscode-server /home/ftuser/.vscode-server-insiders /home/ftuser/commandhistory \
&& echo "export PROMPT_COMMAND='history -a'" >> /home/ftuser/.bashrc \
&& echo "export HISTFILE=~/commandhistory/.bash_history" >> /home/ftuser/.bashrc \
&& chown ftuser: -R /home/ftuser/
USER ftuser
# Empty the ENTRYPOINT to allow all commands
ENTRYPOINT []

View File

@ -1,17 +1,12 @@
{ {
"name": "freqtrade Develop", "name": "freqtrade Develop",
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
"dockerComposeFile": [ "dockerComposeFile": [
"docker-compose.yml" "docker-compose.yml"
// "docker-compose.vscode.yml"
], ],
"service": "ft_vscode", "service": "ft_vscode",
// The optional 'workspaceFolder' property is the path VS Code should open by default when
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
"workspaceFolder": "/freqtrade/", "workspaceFolder": "/freqtrade/",
"settings": { "settings": {

View File

@ -4,14 +4,17 @@ services:
ft_vscode: ft_vscode:
build: build:
context: .. context: ..
dockerfile: "Dockerfile.develop" dockerfile: ".devcontainer/Dockerfile"
volumes: volumes:
- ..:/freqtrade:cached - ..:/freqtrade:cached
- freqtrade-vscode-server:/home/ftuser/.vscode-server - freqtrade-vscode-server:/home/ftuser/.vscode-server
- freqtrade-bashhistory:/home/ftuser/commandhistory - freqtrade-bashhistory:/home/ftuser/commandhistory
# Expose API port
ports:
- "127.0.0.1:8080:8080"
command: /bin/sh -c "while sleep 1000; do :; done" command: /bin/sh -c "while sleep 1000; do :; done"
volumes: volumes:
freqtrade-vscode-server: freqtrade-vscode-server:
freqtrade-bashhistory: freqtrade-bashhistory:

View File

@ -1,20 +0,0 @@
---
version: '3'
services:
freqtrade_develop:
build:
context: .
dockerfile: "./Dockerfile.develop"
volumes:
- ".:/freqtrade"
entrypoint:
- "freqtrade"
freqtrade_bash:
build:
context: .
dockerfile: "./Dockerfile.develop"
volumes:
- ".:/freqtrade"
entrypoint:
- "/bin/bash"