-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bf8692
commit ae68a90
Showing
6 changed files
with
116 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# docker-compose related | ||
COMPOSE_HTTP_TIMEOUT=180 | ||
COMPOSE_PROJECT_NAME=blogdevcontainer | ||
COMPOSE_IGNORE_ORPHANS=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG VARIANT="3.12" | ||
FROM mcr.microsoft.com/devcontainers/python:1-${VARIANT} | ||
|
||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends \ | ||
asciidoctor \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PATH="${PATH}:/workspace/.venv/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||
{ | ||
"name": "Pelican Blog", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "devcontainer", | ||
"workspaceFolder": "/workspace", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1": {} | ||
}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": { | ||
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python", | ||
"pasteImage.basePath": "${projectRoot}/content/assets/images/", | ||
"search.exclude": { | ||
"**/node_modules/**": true, | ||
"**/pelican-plugins": true, | ||
"**/.git": true, | ||
"**/output": true, | ||
"**/outputzip": true, | ||
"**/.venv": true, | ||
"**/attila": true | ||
} | ||
}, | ||
"extensions": [ | ||
"EditorConfig.EditorConfig", | ||
"bierner.emojisense", | ||
"bierner.markdown-preview-github-styles", | ||
"mushan.vscode-paste-image", | ||
"streetsidesoftware.code-spell-checker", | ||
"svsool.markdown-memo", | ||
"Tyriar.sort-lines", | ||
"yzhang.markdown-all-in-one", | ||
"asciidoctor.asciidoctor-vscode", | ||
"charliermarsh.ruff", | ||
"GitHub.vscode-github-actions" | ||
] | ||
} | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [8000], | ||
|
||
// Use 'portsAttributes' to set default properties for specific forwarded ports. | ||
// More info: https://containers.dev/implementors/json_reference/#port-attributes | ||
"portsAttributes": { | ||
"8000": { | ||
"label": "My Blog", | ||
"onAutoForward": "notify" | ||
} | ||
}, | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "bash .devcontainer/post-create.sh", | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
"remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '3.8' | ||
services: | ||
devcontainer: | ||
image: arulrajnet/vscode-pelican-devcontainer:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
VARIANT: 3.12 | ||
volumes: | ||
- ..:/workspace:cached | ||
# Softlink is not working. So mounted from actual location | ||
- ~/Dropbox/workspace/ubuntu_home/.aws:/root/.aws:cached | ||
- ~/Dropbox/workspace/ubuntu_home/.ssh:/root/.ssh:cached | ||
- ~/Dropbox/workspace/ubuntu_home/.gitconfig:/root/.gitconfig:cached | ||
- ~/Dropbox/workspace/ubuntu_home/.gitignore_global:/root/.gitignore_global:cached | ||
command: sleep infinity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
## | ||
## Create some aliases | ||
## | ||
echo 'alias ll="ls -alF"' >> $HOME/.bashrc | ||
|
||
WORKSPACE_DIR=/workspace | ||
|
||
# Now install all dependencies | ||
pip install . | ||
|
||
chmod 600 -R ~/.ssh | ||
|
||
echo "Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters