Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(ubuntu): upgrade to lts #11

Merged
merged 1 commit into from
May 26, 2022
Merged
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
38 changes: 28 additions & 10 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

# ------------------------------
# Labels
Expand Down Expand Up @@ -38,13 +38,13 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone

RUN apt update && apt upgrade -y
RUN apt install sudo screen tzdata locales lsb-release -y
RUN apt install sudo screen tzdata locales lsb-release software-properties-common -y

# APT
RUN apt install ca-certificates gnupg -y

# Essential
RUN apt install build-essential git curl wget vim -y
RUN apt install build-essential git curl wget vim jq -y

# Locale
RUN locale-gen $LOCAL && update-locale LANG=$LOCAL
Expand All @@ -64,11 +64,9 @@ RUN apt install python3-dev python3-pip python3-setuptools -y
# Docker
# ------------------------------
WORKDIR /usr/local/docker
# Install Docker CE CLI
RUN curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
&& echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list \
&& apt update \
&& apt install -y docker-ce-cli

# Install Docker
RUN apt install docker.io -y

# Install Docker Compose
RUN LATEST_COMPOSE_VERSION=$(curl -sSL "https://api.github.com/repos/docker/compose/releases/latest" | grep -o -P '(?<="tag_name": ").+(?=")') \
Expand All @@ -89,6 +87,13 @@ RUN source $NVM_DIR/nvm.sh \
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH

# ------------------------------
# NPM Global Packages
# ------------------------------
RUN [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
&& npm install --global gi-gitignore-generator \
&& npm cache clean --force

# ------------------------------
# LSD
# ------------------------------
Expand Down Expand Up @@ -118,8 +123,14 @@ RUN useradd -u ${PUID} -U -d ${HOME} -s /bin/zsh ${USER} \
# ------------------------------
# User Permissions
# ------------------------------
RUN groupadd docker
RUN usermod -a -G docker $USER
RUN adduser $USER sudo
RUN addgroup --system docker \
&& adduser $USER docker \
&& newgrp docker
RUN addgroup wsl \
&& adduser $USER wsl \
&& newgrp wsl \
&& groupmod --gid 1001 wsl

# ------------------------------
# User Configuration
Expand All @@ -128,6 +139,13 @@ COPY home/ ${HOME}/
RUN chown -R ${PUID}:${PGID} $HOME
RUN chown -R ${PUID}:${PGID} /usr/local/nvm

# ------------------------------
# Clean
# ------------------------------
RUN apt autoremove \
&& apt autoclean \
&& apt clean

# ------------------------------
# Ready
# ------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/home/.config/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ format = "[@$hostname](bold green) "
ssh_only = false

[git_metrics]
only_nonzero_diffs = false
only_nonzero_diffs = true
disabled = false

[cmd_duration]
Expand Down
37 changes: 22 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ A `devcontainer.json` file in your project tells VS Code how to access a develop

[More information](https://code.visualstudio.com/docs/remote/containers)

## Table of contents
> Table of contents

- [TypeScript DevContainer Workspace](#typescript-devcontainer-workspace)
- [Table of contents](#table-of-contents)
- [Dev-Container](#dev-container)
- [How to use](#how-to-use)
- [Environment](#environment)
- [Libs](#libs)
- [Essential](#essential)
- [Others](#others)
- [How to customize](#how-to-customize)
- [How to use](#how-to-use)
- [Environment](#environment)
- [CLI](#cli)
- [Libs](#libs)
- [Essential](#essential)
- [Others](#others)
- [How to customize](#how-to-customize)
- [VSCode Extensions](#vscode-extensions)
- [TypeScript](#typescript)
- [Files](#files)
Expand All @@ -33,7 +33,7 @@ A `devcontainer.json` file in your project tells VS Code how to access a develop

# Dev-Container

# How to use
## How to use

In your project, create `.devcontainer/devcontainer.json` [[?]](https://aka.ms/devcontainer.json) :

Expand Down Expand Up @@ -87,32 +87,39 @@ An example is available [here](./example).

> /!\ You must install Nerd Font "[Hack Nerd Font Mono](https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack/Regular/complete/Hack%20Regular%20Nerd%20Font%20Complete%20Mono.ttf)" /!\

## Environment
### Environment

Based on [Ubuntu 22.04](https://hub.docker.com/_/ubuntu)

- [ZSH](https://www.zsh.org/) & [Oh-My-ZSH](https://github.com/ohmyzsh/ohmyzsh) Zsh is a shell designed for interactive use, although it is also a powerful scripting language.
- [Starship](https://starship.rs/) The minimal, blazing-fast, and infinitely customizable prompt for any shell!
- [LSD](https://github.com/Peltoche/lsd) Colorizes the ls output with color and icons.

### CLI

- [Vim](https://www.vim.org/) Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient.
- [Docker](https://www.docker.com/) & [Docker-Compose](https://docs.docker.com/compose/) Lets you run Docker within Docker.
- [TheFuck](https://github.com/nvbn/thefuck#installation) The Fuck is a magnificent app, that corrects errors in previous console commands.
- [JQ](https://github.com/stedolan/jq) jq is a lightweight and flexible command-line JSON processor.
- [gi](https://github.com/Ealenn/gi-gitignore-generator) CLI to generate .gitignore or .gitignore_global files

## Libs
### Libs

- [Docker](https://www.docker.com/) & [Docker-Compose](https://docs.docker.com/compose/) Lets you run Docker within Docker.
- [NVM](https://github.com/nvm-sh/nvm) with [Node LTS](https://nodejs.dev/) installed by default. NVM is a version manager for NodeJS.
- [Python3](https://www.python.org) Python is a programming language that lets you work quickly and integrate systems more effectively.

## Essential
### Essential

- [Git](https://git-scm.com/) Git is a free and open source distributed version control system.
- [Curl](https://curl.se/) Command line tool for transferring data with URLs.
- [Wget](https://www.gnu.org/software/wget/) GNU Wget is a free software package for retrieving files using HTTP, HTTPS, FTP and FTPS.

## Others
### Others

- [ca-certificates](https://packages.debian.org/en/sid/ca-certificates) Contains the certificate authorities shipped with Mozilla's browser to allow SSL-based applications to check for the authenticity of SSL connections.
- [gnupg](https://packages.debian.org/en/sid/gnupg) GnuPG is GNU's tool for secure communication and data storage.

# How to customize
## How to customize

Create `.devcontainer/Dockerfile` and extend this codespace :

Expand Down
Loading