Skip to content

Commit 903a2ef

Browse files
Optimize devcontainer build.
1 parent 8f9df66 commit 903a2ef

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Note: You can use any Debian/Ubuntu based image you want.
2-
FROM mcr.microsoft.com/devcontainers/base:bullseye
2+
FROM mcr.microsoft.com/devcontainers/python:3.7-bullseye
33

44
RUN \
55
apt update && \
6-
apt-get install bash-completion graphviz default-mysql-client -y
6+
apt-get install bash-completion graphviz default-mysql-client -y && \
7+
pip install flake8 black faker ipykernel nose nose-cov datajoint && \
8+
pip uninstall datajoint -y
79

810
ENV DJ_HOST fakeservices.datajoint.io
911
ENV DJ_USER root

.devcontainer/devcontainer.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@
1313
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
1414
"ghcr.io/devcontainers/features/git:1": {},
1515
"ghcr.io/eitsupi/devcontainer-features/jq-likes:1": {},
16-
"ghcr.io/guiyomh/features/vim:0": {},
17-
"ghcr.io/devcontainers/features/python:1": {
18-
"version": "3.7"
19-
}
16+
"ghcr.io/guiyomh/features/vim:0": {}
2017
},
21-
"postCreateCommand": "pip install flake8 black faker ipykernel nose nose-cov && pip install -e . && MYSQL_VER=5.7 MINIO_VER=RELEASE.2022-08-11T04-37-28Z docker compose -f local-docker-compose.yml up --build -d",
18+
"onCreateCommand": "pip install -e . && MYSQL_VER=5.7 MINIO_VER=RELEASE.2022-08-11T04-37-28Z docker compose -f local-docker-compose.yml up --build -d",
2219
"customizations": {
2320
"vscode": {
2421
"extensions": [

0 commit comments

Comments
 (0)