Skip to content

Commit

Permalink
reduce the docker size
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Nov 17, 2024
1 parent faf337b commit 75c7def
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ FROM ubuntu:22.04
EXPOSE 80
EXPOSE 443

RUN apt-get update && apt-get install -y apt-utils curl sudo systemd xxd lsof gawk iproute2

ENV TERM xterm

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / make-upload-docker (linux/amd64)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV TZ Etc/UTC

Check warning on line 6 in Dockerfile

View workflow job for this annotation

GitHub Actions / make-upload-docker (linux/amd64)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV DEBIAN_FRONTEND noninteractive

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / make-upload-docker (linux/amd64)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
Expand All @@ -12,18 +10,14 @@ USER root
WORKDIR /opt/hiddify-manager/
COPY . .

RUN mkdir -p /hiddify-data/ssl/ && \
rm -rf /opt/hiddify-manager/ssl && \
ln -sf /hiddify-data/ssl /opt/hiddify-manager/ssl

# RUN mkdir -p ~/.ssh && echo "StrictHostKeyChecking no " > ~/.ssh/config
ENV HIDDIFY_PANLE_SOURCE_DIR=/opt/hiddify-manager/hiddify-panel/src/
ENV DOCKER_MODE=true
ENV USE_VENV=true
RUN bash install.sh install-docker --no-gui
RUN cp /opt/hiddify-manager/other/docker/* /usr/bin/

RUN apt-get update && apt-get install -y apt-utils curl sudo systemd xxd lsof gawk iproute2 &&\
mkdir -p /hiddify-data/ssl/ && \
rm -rf /opt/hiddify-manager/ssl && \
ln -sf /hiddify-data/ssl /opt/hiddify-manager/ssl &&\
bash install.sh install-docker --no-gui &&\
rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

COPY other/docker/ /usr/bin/


ENTRYPOINT ["./docker-init.sh"]

0 comments on commit 75c7def

Please sign in to comment.