Skip to content

Commit

Permalink
add devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrll committed Nov 21, 2023
1 parent 912c15e commit 7b048fb
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "Rust",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye",

// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
"mounts": [
{
"source": "devcontainer-cargo-cache-${devcontainerId}",
"target": "/usr/local/cargo",
"type": "volume"
}
],

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y libgeos-c1v5 libgeos-dev pkg-config"

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ target/
/cosmogony/.idea/modules.xml
/cosmogony/.idea/workspace.xml
/cosmogony/Cargo.lock
cosmogony_france.jsonl.gz
.idea/.gitignore
.idea/GitLink.xml
.idea/kubernetes-settings.xml
.idea/inspectionProfiles/Project_Default.xml
cosmogony_liechtenstein.json
france.pbf
liechtenstein.pbf
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Cosmogony",
"program": "${workspaceFolder}/target/debug/cosmogony",
"args": ["generate", "--input", "france.pbf"],
"cwd": "${workspaceFolder}"
}
]
}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM rust:1-slim-buster as builder
WORKDIR /srv/cosmogony

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y libgeos-c1v5 libgeos-dev && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update && apt-get install -y libgeos-c1v5 libgeos-dev pkg-config && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY . ./

Expand All @@ -19,7 +19,7 @@ FROM debian:buster-slim
WORKDIR /srv

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y libgeos-c1v5 libgeos-dev && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update && apt-get install -y libgeos-c1v5 libgeos-dev pkg-config && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=builder /srv/cosmogony/cosmogony.bin /usr/bin/cosmogony

Expand Down

0 comments on commit 7b048fb

Please sign in to comment.