--- /dev/null
+ARG VARIANT=latest
+FROM elixir:${VARIANT}
+
+# This Dockerfile adds a non-root user with sudo access. Update the “remoteUser” property in
+# devcontainer.json to use it. More info: https://aka.ms/vscode-remote/containers/non-root-user.
+ARG USERNAME=vscode
+ARG USER_UID=1000
+ARG USER_GID=$USER_UID
+
+# Options for common package install script
+ARG INSTALL_ZSH="true"
+ARG UPGRADE_PACKAGES="true"
+ARG COMMON_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/script-library/common-debian.sh"
+ARG COMMON_SCRIPT_SHA="dev-mode"
+
+# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
+RUN apt-get update \
+ && export DEBIAN_FRONTEND=noninteractive \
+ && apt-get -y install --no-install-recommends curl ca-certificates 2>&1 \
+ && curl -sSL ${COMMON_SCRIPT_SOURCE} -o /tmp/common-setup.sh \
+ && ([ "${COMMON_SCRIPT_SHA}" = "dev-mode" ] || (echo "${COMMON_SCRIPT_SHA} */tmp/common-setup.sh" | sha256sum -c -)) \
+ && /bin/bash /tmp/common-setup.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
+
+ # Install instal hex and rebar
+ && apt-get install -y build-essential \
+ && mix local.hex --force \
+ && mix local.rebar --force \
+
+ # Clean up
+ && apt-get autoremove -y \
+ && apt-get clean -y \
+ && rm -rf /var/lib/apt/lists/* /tmp/common-setup.sh
--- /dev/null
+{
+ "name": "Elixir",
+ "build": {
+ "dockerfile": "Dockerfile",
+ "args": {
+ // Update 'VARIANT' to pick a Elixir version: 1.10
+ "VARIANT": "latest",
+ }
+ },
+ // "workspaceFolder": "/workspace",
+
+ // Set *default* container specific settings.json values on container create.
+ "settings": {
+ "terminal.integrated.shell.linux": "/bin/zsh"
+ },
+
+ // Add the IDs of extensions you want installed when the container is created.
+ "extensions": [],
+
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
+ // "forwardPorts": [4000, 4001],
+
+ // Use 'postCreateCommand' to run commands after the container is created.
+ "postCreateCommand": "mix deps.get"
+
+ // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
+ // "remoteUser": "vscode"
+}
## Usage
-There are 25 modules, 25 tests, and 50 mix tasks.
+There are 25 modules, 25 tests, and 50 mix tasks.
1. Fill in the tests with the example solutions.
1. Write your implementation.
@tag :skip # Make sure to remove to run your test.
test "part1" do
- input = nil
+ input = nil
result = part1(input)
assert result
@tag :skip # Make sure to remove to run your test.
test "part2" do
- input = nil
+ input = nil
result = part2(input)
assert result
|> part1()
|> IO.inspect(label: "Part 1 Results")
end
-end
+end
```
## Installation
$ rm -rf .git
$ git init
```
+### Get started coding with zero configuration
+
+#### Using Visual Studio Code
+
+1. [Install Docker Desktop](https://www.docker.com/products/docker-desktop)
+1. Open project directory in VS Code
+1. Press F1, and select `Remote-Containers: Reopen in Container...`
+1. Wait a few minutes as it pulls image down and builds Dev Conatiner Docker image (this should only need to happen once unless you modify the Dockerfile)
+ 1. You can see progress of the build by clicking `Starting Dev Container (show log): Building image` that appears in bottom right corner
+ 1. During the build process it will also automatically run `mix deps.get`
+1. Once complete VS Code will connect your running Dev Container and will feel like your doing local development
+1. If you would like to use a specific version of Elixir change the `VARIANT` version in `.devcontainer/devcontainer.json`
+1. If you would like more information about VS Code Dev Containers check out the [dev container documentation](https://code.visualstudio.com/docs/remote/create-dev-container/?WT.mc_id=AZ-MVP-5003399)
+
+#### Compatible with Github Codespaces
+1. If you dont have Github Codespaces beta access, sign up for the beta https://github.com/features/codespaces/signup
+1. On GitHub, navigate to the main page of the repository.
+1. Under the repository name, use the Code drop-down menu, and select Open with Codespaces.
+1. If you already have a codespace for the branch, click New codespace.