Skip to content

Commit

Permalink
WIP: added some basic devcontainer config and a simple Dockerfile bas…
Browse files Browse the repository at this point in the history
…ed on cfe_ubuntu.
  • Loading branch information
rhliang committed Nov 16, 2024
1 parent a5b9841 commit 584a132
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ARG UBUNTU_VERSION=20.04

FROM ubuntu:${UBUNTU_VERSION} AS base

ARG DEBIAN_FRONTEND=noninteractive

ENV TZ=America/Vancouver \
RUBY_VERSION=2.2.2 \
BUNDLER_VERSION=1.17.3

RUN apt-get -y update &&\
apt-get -y upgrade &&\
apt-get install -y curl gpg

RUN echo "deb http://security.ubuntu.com/ubuntu/ bionic-security main" >> /etc/apt/sources.list &&\
echo "deb http://security.ubuntu.com/ubuntu/ bionic main" >> /etc/apt/sources.list &&\
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 &&\
apt update &&\
apt install -y \
gawk=1:4.1.4+dfsg-1build1

RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - && \
curl -sSL https://get.rvm.io | bash -s stable && \
usermod -a -G rvm root

RUN /bin/bash -l -c "source /etc/profile.d/rvm.sh && rvm pkg install openssl"
RUN /bin/bash -l -c "source /etc/profile.d/rvm.sh && rvm requirements && rvm install ${RUBY_VERSION} --with-openssl-dir=/usr/local/rvm/usr && rvm --default use ${RUBY_VERSION}"
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "CfE Ubuntu Ruby",

"build": {
"dockerfile": "Dockerfile"
}

"features": {
"ghcr.io/devcontainers/features/ruby:1": {
"version": "2.2"
}
}
}

0 comments on commit 584a132

Please sign in to comment.