From d970ec35b71ee1dc05bd48822ff191c9d4a62948 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 14 Nov 2020 19:22:29 -0800 Subject: [PATCH] Update dockerfile to build quicker --- Dockerfile | 11 ++++------- docker-compose.example.yml | 25 ++++++++++++------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index a386a24..0880586 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,11 @@ -# ---------------------------------- -# Pterodactyl Panel Dockerfile -# ---------------------------------- - FROM golang:1.15-alpine +ARG VERSION="develop" COPY . /go/wings/ WORKDIR /go/wings/ RUN apk add --no-cache upx \ - && CGO_ENABLED=0 go build -ldflags="-s -w" \ - && upx --brute wings + && CGO_ENABLED=0 go build -ldflags="-s -w -X github.com/pterodactyl/wings/system.Version=${VERSION}" \ + && upx wings FROM alpine:latest COPY --from=0 /go/wings/wings /usr/bin/ -CMD ["wings","--config", "/etc/pterodactyl/config.yml"] \ No newline at end of file +CMD ["wings", "--config", "/etc/pterodactyl/config.yml"] \ No newline at end of file diff --git a/docker-compose.example.yml b/docker-compose.example.yml index 3715d0e..b199b41 100644 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -1,17 +1,17 @@ -version: '3.5' +version: '3.8' services: - daemon: - build: . + wings: + image: quay.io/pterodactyl/wings:latest restart: always networks: - - daemon0 + - wings0 ports: - "8080:8080" - "2022:2022" tty: true environment: - - "DEBUG=false" - - "TZ=UTC" # change to the three letter timezone of your choosing + TZ: UTC + DEBUG: false volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "/var/lib/docker/containers/:/var/lib/docker/containers/" @@ -19,17 +19,16 @@ services: - "/var/lib/pterodactyl/:/var/lib/pterodactyl/" - "/var/log/pterodactyl/:/var/log/pterodactyl/" - "/tmp/pterodactyl/:/tmp/pterodactyl/" - ## you may need /srv/daemon-data if you are upgrading from an old daemon - ## - "/srv/daemon-data/:/srv/daemon-data/" - ## Required for ssl if you user let's encrypt. uncomment to use. - ## - "/etc/letsencrypt/:/etc/letsencrypt/" - + # you may need /srv/daemon-data if you are upgrading from an old daemon + #- "/srv/daemon-data/:/srv/daemon-data/" + # Required for ssl if you user let's encrypt. uncomment to use. + #- "/etc/letsencrypt/:/etc/letsencrypt/" networks: daemon0: - name: daemon0 + name: wings0 driver: bridge ipam: config: - subnet: "172.21.0.0/16" driver_opts: - com.docker.network.bridge.name: daemon0 \ No newline at end of file + com.docker.network.bridge.name: wings0 \ No newline at end of file