mirror of
https://github.com/warp-tech/warpgate.git
synced 2024-09-20 06:46:17 +08:00
Dockerfile now uses assets relative to the root directory
This commit is contained in:
parent
465c164953
commit
50af5fe2c9
|
@ -9,9 +9,11 @@ RUN curl -fsSL https://deb.nodesource.com/setup_17.x | bash - \
|
|||
&& npm install -g yarn \
|
||||
&& cargo install just
|
||||
|
||||
RUN git clone https://github.com/Eugeny/warpgate /opt/warpgate \
|
||||
&& cd /opt/warpgate \
|
||||
COPY . /opt/warpgate
|
||||
|
||||
RUN cd /opt/warpgate \
|
||||
&& just yarn \
|
||||
&& just openapi \
|
||||
&& just yarn build \
|
||||
&& cargo build
|
||||
|
||||
|
@ -19,13 +21,12 @@ FROM debian:bullseye
|
|||
LABEL maintainer=heywoodlh
|
||||
|
||||
COPY --from=build /opt/warpgate/target/debug/warpgate /usr/local/bin/warpgate
|
||||
COPY run.sh /run.sh
|
||||
COPY expect.sh /expect.sh
|
||||
COPY docker/run.sh /run.sh
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y expect openssl \
|
||||
&& apt-get install -y openssl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
EXPOSE 2222
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/expect -f
|
||||
|
||||
set password [lindex $argv 0];
|
||||
|
||||
spawn warpgate hash
|
||||
expect "*Password to be hashed*"
|
||||
send -- "$password\r"
|
||||
expect eof
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
[[ -e /data/web-admin.certificate.pem ]] || openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -keyout /data/web-admin.key.pem -out /data/web-admin.certificate.pem -subj "/C=PE/ST=Lima/L=Lima/O=Acme Inc. /OU=IT Department/CN=acme.com"
|
||||
|
||||
password_hash=$(/expect.sh "${ADMIN_PASS}" | tail -1 | sed 's/\r$//')
|
||||
password_hash=$(echo -n "${ADMIN_PASS}" | warpgate hash | cat)
|
||||
|
||||
cat << EOF > /etc/warpgate.yaml
|
||||
---
|
||||
|
|
Loading…
Reference in a new issue