Skip to content
Snippets Groups Projects
Commit 9285b117 authored by cyril.cros's avatar cyril.cros
Browse files

Back to Dockerfile multistage

Fix dockerfile #1

Fix dockerfile #2

Fix dockerfile #3
parent a06625f3
No related branches found
No related tags found
No related merge requests found
......@@ -33,45 +33,15 @@ cluster_access_test:
rules:
- when: always # TODO change where necessary
build_base_jbrowse_config_file:
stage: build
image: gcr.io/kaniko-project/executor:debug-v0.21.0
before_script:
# yamllint disable-line rule:line-length
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
script:
- /kaniko/executor --cache=true --context $CI_PROJECT_DIR/image
--dockerfile $CI_PROJECT_DIR/image/Dockerfile_base
--destination $CI_REGISTRY_IMAGE:jbrowse2-base-$CI_COMMIT_SHORT_SHA
- echo "Pushed $CI_REGISTRY_IMAGE:jbrowse2-base-$CI_COMMIT_SHORT_SHA"
export_artifacts_via_inception:
stage: build
image: $CI_REGISTRY_IMAGE:jbrowse2-base-$CI_COMMIT_SHORT_SHA
needs:
- build_base_jbrowse_config_file
script:
- cp /app/annelids/index.html image/
- cp /app/annelids/config.json image/
artifacts:
paths:
- image/index.html
- image/config.json
build_nginx_with_jbrowse_config_file:
stage: build
image: gcr.io/kaniko-project/executor:debug-v0.21.0
needs:
- build_base_jbrowse_config_file
- export_artifacts_via_inception
before_script:
# yamllint disable-line rule:line-length
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
script:
- echo "IMG_BASE='$CI_REGISTRY_IMAGE:jbrowse2-base-$CI_COMMIT_SHORT_SHA'"
- /kaniko/executor --cache=true --context $CI_PROJECT_DIR/image
--build-arg "IMG_BASE='$CI_REGISTRY_IMAGE:jbrowse2-base-$CI_COMMIT_SHORT_SHA'"
--dockerfile $CI_PROJECT_DIR/image/Dockerfile_advanced
--dockerfile $CI_PROJECT_DIR/image/Dockerfile
--destination $CI_REGISTRY_IMAGE:jbrowse2-$CI_COMMIT_SHORT_SHA
- echo "Destination follows"
- echo $CI_REGISTRY_IMAGE:jbrowse2-$CI_COMMIT_SHORT_SHA
......@@ -82,10 +52,10 @@ export_advanced_artifacts_via_inception:
needs:
- build_nginx_with_jbrowse_config_file
script:
- cp /usr/share/nginx/html/config.json image/config_advanced.json
- cp /usr/share/nginx/html/config.json image/config.json
artifacts:
paths:
- image/config_advanced.json
- image/config.json
deploy_to_k8s:
stage: deploy
......
......@@ -5,6 +5,7 @@
"tomoki1207.pdf",
"christian-kohler.path-intellisense",
"nextflow.nextflow",
"janisdd.vscode-edit-csv"
"janisdd.vscode-edit-csv",
"ms-azuretools.vscode-docker"
]
}
# Stage 1: Jbrowse config file generated
FROM quay.io/biocontainers/jbrowse2:2.15.3--hbbc3ce4_0 as jbrowse_base
WORKDIR /app
COPY jbrowse_script_base.sh .
RUN ./jbrowse_script_base.sh \
&& rm jbrowse_script_base.sh
RUN rm -rf annelids/node_modules
# Stage 2: Json processing
FROM ghcr.io/jqlang/jq:1.7.1 as jbrowse_builder
WORKDIR /app/annelids
COPY --from=jbrowse_base /app/annelids/ /app/annelids/
COPY default_session.json tracks.json ./
RUN --argfile base default_session.json '.defaultSession = $base' < config.json > config.json
# | jq --argfile base tracks.json '. += $base' > config.json \
# && rm default_session.json tracks.json
# Stage 3: Load into nginx
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=jbrowse_builder /app/annelids/ .
ENTRYPOINT ["nginx", "-g", "daemon off;"]
# Stage 1: Jbrowse previous image
ARG IMG_BASE
FROM ${IMG_BASE} as jbrowse_builder
WORKDIR /app/annelids
COPY jbrowse_script_advanced.sh .
RUN ./jbrowse_script_advanced.sh
RUN rm -rf annelids/node_modules
# Stage 2: Load into nginx
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=jbrowse_builder /app/annelids/ .
ENTRYPOINT ["nginx", "-g", "daemon off;"]
# Stage 1: Jbrowse config file generated
FROM quay.io/biocontainers/jbrowse2:2.15.3--hbbc3ce4_0
WORKDIR /app
COPY jbrowse_script_base.sh .
RUN ./jbrowse_script_base.sh
#!/bin/bash -eux
# Platy only for now
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/1.final.bam -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 1" --category "ATACseq" --trackId "library_bam_1" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/1.final.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/1.final.bigwig -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 1" --category "ATACseq" --trackId "library_bigwig_1" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/2.final.bam -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 2" --category "ATACseq" --trackId "library_bam_2" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/2.final.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/2.final.bigwig -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 2" --category "ATACseq" --trackId "library_bigwig_2" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/3.final.bam -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 3" --category "ATACseq" --trackId "library_bam_3" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/3.final.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/3.final.bigwig -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 3" --category "ATACseq" --trackId "library_bigwig_3" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/4.final.bam -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 4" --category "ATACseq" --trackId "library_bam_4" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/4.final.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/4.final.bigwig -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 4" --category "ATACseq" --trackId "library_bigwig_4" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/5.final.bam -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 5" --category "ATACseq" --trackId "library_bam_5" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/5.final.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/ATACseq/5.final.bigwig -a "pdumv021" -d "Lara's Snakemake outputs" -n "Library 5" --category "ATACseq" --trackId "library_bigwig_5" --indexFile https://s3.embl.de/annelids/pdumv021/ATACseq/
jbrowse add-track https://s3.embl.de/annelids/pdumv021/MASseq/collapsed.gff.gz -a "pdumv021" -d "MASseq outputs from running isoseq collapse against the Pdum genome" -n "SN073 MASseq isoforms from the 15ng prep" --category "MASseq" --trackId "SN073_15ng_collapsed" --indexFile https://s3.embl.de/annelids/pdumv021/MASseq/collapsed.gff.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/MASseq/collapsed.gff.gz -a "pdumv021" -d "MASseq outputs from running isoseq collapse against the Pdum genome" -n "SN073 MASseq isoforms" --category "MASseq" --trackId "SN073_60ng_collapsed" --indexFile https://s3.embl.de/annelids/pdumv021/MASseq/collapsed.gff.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN001_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN001" --category "Variants" --trackId "SN001_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN001_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN002_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN002" --category "Variants" --trackId "SN002_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN002_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN003_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN003" --category "Variants" --trackId "SN003_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN003_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN004_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN004" --category "Variants" --trackId "SN004_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN004_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN015_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN015" --category "Variants" --trackId "SN015_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN015_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN016_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN016" --category "Variants" --trackId "SN016_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN016_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN018_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN018" --category "Variants" --trackId "SN018_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN018_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN019_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN019" --category "Variants" --trackId "SN019_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN019_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN020_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN020" --category "Variants" --trackId "SN020_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN020_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN021_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN021" --category "Variants" --trackId "SN021_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN021_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN028_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN028" --category "Variants" --trackId "SN028_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN028_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN029_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN029" --category "Variants" --trackId "SN029_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN029_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN030_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN030" --category "Variants" --trackId "SN030_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN030_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN031_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN031" --category "Variants" --trackId "SN031_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN031_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN035_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN035" --category "Variants" --trackId "SN035_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN035_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN054_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN054" --category "Variants" --trackId "SN054_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN054_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN055_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN055" --category "Variants" --trackId "SN055_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN055_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN056_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN056" --category "Variants" --trackId "SN056_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN056_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN057_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN057" --category "Variants" --trackId "SN057_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN057_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN058_vcf.vcf.gz -a "pdumv021" -d "Tobi's variants" -n "SN058" --category "Variants" --trackId "SN058_vcf" --indexFile https://s3.embl.de/annelids/pdumv021/Variants/pdumv021_Variants_SN058_vcf.vcf.gz.tbi
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Planetary Biology SN035 Pos sorted" --category "Tobi BAMs" --trackId "planetary_biol_sn035" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Planetary Biology SN054 Pos sorted" --category "Tobi BAMs" --trackId "planetary_biol_sn054" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Planetary Biology SN055 Pos sorted" --category "Tobi BAMs" --trackId "planetary_biol_sn055" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Planetary Biology SN056 Pos sorted" --category "Tobi BAMs" --trackId "planetary_biol_sn056" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Planetary Biology SN057 Pos sorted" --category "Tobi BAMs" --trackId "planetary_biol_sn057" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Planetary Biology SN058 Pos sorted" --category "Tobi BAMs" --trackId "planetary_biol_sn058" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/possorted_genome_bam.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch1_noRG.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Variant batches bam no RG 1" --category "Tobi BAMs" --trackId "variant_atlas_1" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch1_noRG.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch2_noRG.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Variant batches bam no RG 2" --category "Tobi BAMs" --trackId "variant_atlas_2" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch2_noRG.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch3_noRG.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Variant batches bam no RG 3" --category "Tobi BAMs" --trackId "variant_atlas_3" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch3_noRG.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch4_noRG.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Variant batches bam no RG 4" --category "Tobi BAMs" --trackId "variant_atlas_4" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch4_noRG.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch5_noRG.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Variant batches bam no RG 5" --category "Tobi BAMs" --trackId "variant_atlas_5" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch5_noRG.bam.bai
jbrowse add-track https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch6_noRG.bam -a "pdumv021" -d "Tobi sends me bam files" -n "Variant batches bam no RG 6" --category "Tobi BAMs" --trackId "variant_atlas_6" --indexFile https://s3.embl.de/annelids/pdumv021/TobiBAMs/Atlas_Batch6_noRG.bam.bai
File moved
#!/bin/sh
jq --argfile base default_session.json '.defaultSession = $base' config.json
jq --argfile base tracks.json '. += $base' config.json
# combined
cat config.json | jq --argfile base default_session.json '.defaultSession = $base' | jq --argfile base tracks.json '. += $base'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment