Skip to content

Commit

Permalink
Add Nextflow and Docker support for Codespace
Browse files Browse the repository at this point in the history
  • Loading branch information
apca committed Oct 11, 2024
1 parent 2ec09ff commit 03940ed
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use an official Ubuntu as a parent image
FROM ubuntu:20.04

# Install Java 11 (required for Nextflow)
RUN apt-get update && apt-get install -y \
openjdk-11-jdk \
curl \
gnupg2 \
lsb-release \
software-properties-common

# Install Docker dependencies (optional, if not using features)
RUN apt-get update && apt-get install -y \
docker.io \
docker-compose

# Set JAVA_HOME environment variable
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64

# Expose Docker socket
RUN groupadd docker && usermod -aG docker $USER
21 changes: 21 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Nextflow Development Environment",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", // Base Ubuntu container image
"runArgs": [
"--cap-add=SYS_ADMIN", // Ensure Docker CLI access
"--security-opt",
"seccomp=unconfined" // Unconfine security for Docker in Codespace
],
"features": {
"docker-in-docker": "true" // Enable Docker within Codespace
},
"postCreateCommand": "curl -s https://get.nextflow.io | bash && chmod +x nextflow && sudo mv nextflow /usr/local/bin/",
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker" // Docker extension for VS Code
]
}
}
}

0 comments on commit 03940ed

Please sign in to comment.