Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

ara/add-docker-container-devrel-support #1640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.159.0/containers/javascript-node
{
"name": "Erlang",
"build": {
"dockerfile": "remote.Dockerfile",
"args": { "VARIANT": "24.3.4.0-alpine" }
},

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/sh"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"pgourlain.erlang"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [3000],
}
24 changes: 24 additions & 0 deletions .devcontainer/remote.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# [Choice] alpine,...
ARG VARIANT="alpine"
FROM erlang:${VARIANT} as deps-compiler

ENV DEBIAN_FRONTEND=noninteractive

# Setup rebar diagnostics
ARG REBAR_DIAGNOSTIC=0
ENV DIAGNOSTIC=${REBAR_DIAGNOSTIC}

ENV CC=gcc CXX=g++ CFLAGS="-U__sun__" \
ERLANG_ROCKSDB_OPTS="-DWITH_BUNDLE_SNAPPY=ON -DWITH_BUNDLE_LZ4=ON" \
ERL_COMPILER_OPTIONS="[deterministic]" \
PATH="/root/.cargo/bin:$PATH" \
RUSTFLAGS="-C target-feature=-crt-static"

# Install dependencies to build
RUN apk add --no-cache --update \
autoconf automake bison build-base bzip2 cmake curl \
dbus-dev flex git gmp-dev libsodium-dev libtool linux-headers lz4 \
openssl-dev pkgconfig protoc sed tar wget bash parallel

# Install Rust toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y