initial commit
This commit is contained in:
commit
c4cdc4d073
9 changed files with 69 additions and 0 deletions
12
.devcontainer/devcontainer.json
Normal file
12
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "CMPUT 325 devcontainer",
|
||||
"build": {
|
||||
"context": "..",
|
||||
"dockerfile": "../Dockerfile"
|
||||
},
|
||||
"extensions": [
|
||||
"mattn.Lisp",
|
||||
"rebornix.prolog",
|
||||
"abelcour.asp-syntax-highlight"
|
||||
]
|
||||
}
|
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"*.pl": "prolog"
|
||||
}
|
||||
}
|
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
|||
FROM ubuntu:jammy
|
||||
# rlwrap segfaulted on :kinetic, so using jammy instead
|
||||
LABEL maintainer="sjkillen@ualberta.ca"
|
||||
|
||||
RUN apt-get -qq update && apt-get -qq install sudo gringo clasp time swi-prolog sbcl rlwrap
|
||||
|
||||
ARG USERNAME=user
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
# Copied from https://code.visualstudio.com/docs/remote/containers-advanced#_adding-a-nonroot-user-to-your-dev-container
|
||||
# Create the user
|
||||
RUN groupadd --gid $USER_GID $USERNAME \
|
||||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME --shell /bin/bash \
|
||||
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
|
||||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
||||
&& chmod 0440 /etc/sudoers.d/$USERNAME
|
||||
|
||||
USER $USERNAME
|
||||
|
||||
RUN echo "alias sbcl='rlwrap sbcl'" >> /home/$USERNAME/.bashrc
|
31
README.md
Normal file
31
README.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Notes
|
||||
|
||||
- Container will configure vscode's settings to recognize .pl files as Prolog rather than the default Perl.
|
||||
- Will install extensions for lisp, prolog, and ASP
|
||||
- Will configure SBCL to use rlwrap so that you have history when using a lisp REPL
|
||||
|
||||
# How to use
|
||||
|
||||
1. You will need to have vscode and Docker installed.
|
||||
For Ubuntu, docker is installed with `sudo apt install docker.io`
|
||||
2. Install the vscode extension for docker dev containers as shown in the image below
|
||||

|
||||
|
||||
3. Clone this repository (or just download it) and open the folder that contains the .devcontainer folder
|
||||
|
||||

|
||||
|
||||
4. Your folder structure should look like the following
|
||||
|
||||

|
||||
|
||||
5. Open the commands pallete (CTRL + SHIFT + P) or (CTRL + P + >) and type "open in container" and select "Dev Containers: Reopen in Container"
|
||||
|
||||

|
||||
|
||||
6. It may take a bit to download the docker container, go grab a coffee
|
||||
|
||||
7. Confirm that you're running in the container and have the extensions shown in the following image installed
|
||||
|
||||

|
||||
|
BIN
howtouse_devcontainer/1.png
Normal file
BIN
howtouse_devcontainer/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
BIN
howtouse_devcontainer/2.png
Normal file
BIN
howtouse_devcontainer/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
howtouse_devcontainer/3.png
Normal file
BIN
howtouse_devcontainer/3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
howtouse_devcontainer/4.png
Normal file
BIN
howtouse_devcontainer/4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 115 KiB |
BIN
howtouse_devcontainer/5.png
Normal file
BIN
howtouse_devcontainer/5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
Loading…
Add table
Reference in a new issue