File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM geerlingguy/docker-debian12-ansible:latest
2+
3+ ENV LANG=C.UTF-8
4+ ENV LC_ALL=C.UTF-8
5+
6+ RUN apt-get update && \
7+ apt-get install -y --no-install-recommends \
8+ python3-passlib \
9+ git \
10+ pwgen \
11+ openssh-client \
12+ curl && \
13+ rm -rf /var/lib/apt/lists/* && \
14+ rm -Rf /usr/share/doc && rm -Rf /usr/share/man && \
15+ apt-get clean
16+
17+ # Install Just
18+ RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
19+
20+ # Preserve command history across container restarts
21+ RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
22+ && echo "$SNIPPET" >> "/root/.bashrc"
Original file line number Diff line number Diff line change 1+ // For format details, see https://aka.ms/devcontainer.json.
2+ {
3+ "name" : " matrix-docker-ansible-deploy" ,
4+ "build" : {
5+ "dockerfile" : " Dockerfile" ,
6+ "context" : " .."
7+ },
8+ "postCreateCommand" : {
9+ "Fix Volume Permissions" : " sudo chown -R $(whoami): /commandhistory"
10+ },
11+ "postAttachCommand" : " bash" ,
12+ "mounts" : [
13+ {
14+ "source" : " ${localEnv:SSH_AUTH_SOCK}" ,
15+ "target" : " /agent.sock" ,
16+ "type" : " bind"
17+ },
18+ {
19+ "source" : " matrix-docker-ansible-deploy-bashhistory" ,
20+ "target" : " /commandhistory" ,
21+ "type" : " volume"
22+ }
23+ ],
24+ "containerEnv" : {
25+ "SSH_AUTH_SOCK" : " /agent.sock"
26+ },
27+ "customizations" : {
28+ "vscode" : {
29+ "extensions" : [
30+ " EditorConfig.EditorConfig" ,
31+ " redhat.ansible" ,
32+ " redhat.vscode-yaml" ,
33+ " ms-python.python"
34+ ]
35+ }
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments