Skip to content
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
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ FROM alpine:latest

RUN apk update && \
apk upgrade && \
apk add --no-cache autossh supervisor openssl && \
rm -rf /var/cache/apk/*
apk add --no-cache autossh supervisor openssl && \
rm -rf /var/cache/apk/* && \
adduser -D appuser

RUN mkdir /etc/armorcode

RUN adduser -D appuser
COPY /* /etc/armorcode/

RUN chown -R appuser:appuser /etc/armorcode

RUN sed -i 's/user\s*=\s*root/user=appuser/g' /etc/armorcode/supervisord.conf

RUN touch /supervisord.log /supervisord.pid

RUN chown -R appuser /etc/armorcode
RUN chown appuser:appuser /supervisord.log /supervisord.pid

USER appuser

Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ version: "3.9"
services:
armorcode-tunnel-1:
build: .
restart: always
volumes:
- .:/etc/armorcode
restart: always
4 changes: 2 additions & 2 deletions supervisord.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[program:ACCESS_JIRA]
command=/usr/bin/autossh -M 0 -N -R *:5000:jira.acme.com:443 -i /etc/armorcode/private-key.pem -o "ServerAliveInterval=30" -o "ServerAliveCountMax=3" -o "StrictHostKeyChecking=no" ssh-user@<server>
user=ssh-user
user=appuser

[program:ACCESS_SONARQUBE]
command=/usr/bin/autossh -M 0 -N -R *:5001:sonar.acme.com:443 -i /etc/armorcode/private-key.pem -o "ServerAliveInterval=30" -o "ServerAliveCountMax=3" -o "StrictHostKeyChecking=no" ssh-user@<server>
user=ssh-user
user=appuser