Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 8e7ac41

Browse files
committed
Added Perl devcontainer definition
1 parent 236e43a commit 8e7ac41

File tree

6 files changed

+121
-0
lines changed

6 files changed

+121
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#-------------------------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+
#-------------------------------------------------------------------------------------------------------------
5+
6+
FROM perl:5
7+
8+
# Install git, process tools
9+
RUN apt-get update && apt-get -y install git procps
10+
11+
12+
# Clean up
13+
RUN apt-get autoremove -y \
14+
&& apt-get clean -y \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
# Set the default shell to bash instead of sh
18+
ENV SHELL /bin/bash
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Perl",
3+
"dockerFile": "Dockerfile",
4+
"runArgs": [
5+
"--cap-add=SYS_PTRACE",
6+
"--security-opt", "seccomp=unconfined"
7+
],
8+
9+
// Uncomment the next line if you want to publish any ports.
10+
// "appPort": [],
11+
12+
// Uncomment the next line if you want to add in default container specific settings.json values
13+
// "settings": { "workbench.colorTheme": "Quiet Light" },
14+
15+
// Uncomment the next line to run commands after the container is created.
16+
// "postCreateCommand": "perl -v",
17+
18+
"extensions": [
19+
"mortenhenriksen.perl-debug",
20+
"d9705996.perl-toolbox"
21+
]
22+
}

containers/perl/.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
README.md
2+
test-project
3+
.vscode
4+
.npmignore
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "perl",
9+
"request": "launch",
10+
"name": "Perl-Debug local",
11+
"console": "integratedTerminal",
12+
"program": "${workspaceFolder}/test-project/sample.pl",
13+
"exec": "perl",
14+
"execArgs": [],
15+
"root": "${workspaceRoot}/test-project/",
16+
"inc": [],
17+
"args": [],
18+
"env": {},
19+
"debugRaw": false,
20+
"debugLog": false,
21+
"stopOnEntry": true,
22+
"sessions": "single"
23+
}
24+
]
25+
}

containers/perl/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Perl
2+
3+
## Summary
4+
5+
*Develop Perl applications on Linux*
6+
7+
| Metadata | Value |
8+
|----------|-------|
9+
| *Contributors* | The VS Code Team, Mehant |
10+
| *Definition type* | Dockerfile |
11+
| *Languages, platforms* | Perl |
12+
13+
## Using this definition with an existing folder
14+
15+
This definition does not require any special steps to use. Just follow these steps:
16+
17+
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
18+
19+
2. To use VS Code's copy of this definition:
20+
1. Start VS Code and open your project folder.
21+
2. Press <kbd>F1</kbd> select and **Remote-Containers: Create Container Configuration File...** from the command palette.
22+
3. Select the Perl definition.
23+
24+
3. To use latest-and-greatest copy of this definition from the repository:
25+
1. Clone this repository.
26+
2. Copy the contents of `containers/perl/.devcontainer` to the root of your project folder.
27+
3. Start VS Code and open your project folder.
28+
29+
4. After following step 2 or 3, the contents of the `.devcontainer` folder in your project can be adapted to meet your needs.
30+
31+
5. Finally, press <kbd>F1</kbd> and run **Remote-Containers: Reopen Folder in Container** to start using the definition.
32+
33+
## Testing the definition
34+
35+
This definition includes some test code that will help you verify it is working as expected on your system. Follow these steps:
36+
37+
1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine.
38+
2. Clone this repository.
39+
3. Start VS Code, press <kbd>F1</kbd>, and select **Remote-Containers: Open Folder in Container...**
40+
4. Select the `containers/perl` folder.
41+
5. After the folder has opened in the container, press <kbd>F5</kbd> to start the project.
42+
6. You should see "Hello, Remote World!" in the terminal window after the program finishes executing.
43+
7. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing.
44+
45+
## License
46+
47+
Copyright (c) Microsoft Corporation. All rights reserved.
48+
49+
Licensed under the MIT License. See [LICENSE](https://github.com/Microsoft/vscode-dev-containers/blob/master/LICENSE).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/local/bin/perl
2+
use warnings;
3+
print("Hello, Remote World!\n");

0 commit comments

Comments
 (0)