mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-11-02 09:58:50 -06:00
🐛 make developer container working again
This commit is contained in:
1 parent
cc2fbcbd4d
commit
deeac1b815
5 files changed
+53
-21
No files matched your search
@@ -1,10 +1,6 @@
|
||||
#Partially from Odoo's dockerfile
|
||||
#github.com/odoo/docker
|
||||
|
||||
ARG BASE_IMAGE
|
||||
ARG BASE_TAG
|
||||
FROM ${BASE_IMAGE}:${BASE_TAG}
|
||||
LABEL maintainer="FlectraHQ <flectra@flectrahq.com>"
|
||||
FROM ${BASE_IMAGE}
|
||||
LABEL maintainer="Jamotion <info@jamotion.ch>"
|
||||
LABEL authors="FlectraHQ,Jamotion"
|
||||
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
@@ -25,7 +21,9 @@ RUN mkdir -p /var/run/sshd \
|
||||
&& sed -i "s/PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
||||
|
||||
# add special scripts for development
|
||||
ADD flectra/dev/bin /usr/local/bin
|
||||
ADD bin /usr/local/bin
|
||||
|
||||
RUN pip3 install inotify
|
||||
|
||||
VOLUME ["/opt/flectra", "/etc/flectra", "/var/log/flectra"]
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
if [ -f /etc/flectra/ssh-pwd ]; then
|
||||
|
||||
if [ -f /var/lib/flectra/.${HOSTNAME}-pwd ]; then
|
||||
echo "Root password already saved. Using this one"
|
||||
PASS=$(</etc/flectra/ssh-pwd)
|
||||
PASS=$(</var/lib/flectra/.${HOSTNAME}-pwd)
|
||||
else
|
||||
PASS=${ROOT_PASS:-$(pwgen -s 12 1)}
|
||||
_word=$( [ ${ROOT_PASS} ] && echo "preset" || echo "random" )
|
||||
@@ -11,7 +12,7 @@ fi
|
||||
echo "root:$PASS" | chpasswd
|
||||
echo "flectra:$PASS" | chpasswd
|
||||
echo "=> Done!"
|
||||
echo $PASS > /etc/flectra/ssh-pwd
|
||||
echo $PASS > /var/lib/flectra/.${HOSTNAME}-pwd
|
||||
IP=$(hostname --ip-address)
|
||||
echo "========================================================================"
|
||||
echo " You can now connect to this Developer Container via SSH using:"
|
||||
@@ -22,4 +23,5 @@ echo " ssh -p <port> flectra@${IP}"
|
||||
echo ""
|
||||
echo " and enter the password '$PASS' when prompted"
|
||||
echo ""
|
||||
echo "========================================================================"
|
||||
echo "========================================================================"
|
||||
echo "§§PWD: $PASS"
|
||||
Reference in new issue
Block a user