Update dockerfile to build quicker

This commit is contained in:
Dane Everitt 2020-11-14 19:22:29 -08:00
parent e2872e786e
commit d970ec35b7
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 16 additions and 20 deletions

View File

@ -1,14 +1,11 @@
# ----------------------------------
# Pterodactyl Panel Dockerfile
# ----------------------------------
FROM golang:1.15-alpine FROM golang:1.15-alpine
ARG VERSION="develop"
COPY . /go/wings/ COPY . /go/wings/
WORKDIR /go/wings/ WORKDIR /go/wings/
RUN apk add --no-cache upx \ RUN apk add --no-cache upx \
&& CGO_ENABLED=0 go build -ldflags="-s -w" \ && CGO_ENABLED=0 go build -ldflags="-s -w -X github.com/pterodactyl/wings/system.Version=${VERSION}" \
&& upx --brute wings && upx wings
FROM alpine:latest FROM alpine:latest
COPY --from=0 /go/wings/wings /usr/bin/ COPY --from=0 /go/wings/wings /usr/bin/
CMD ["wings","--config", "/etc/pterodactyl/config.yml"] CMD ["wings", "--config", "/etc/pterodactyl/config.yml"]

View File

@ -1,17 +1,17 @@
version: '3.5' version: '3.8'
services: services:
daemon: wings:
build: . image: quay.io/pterodactyl/wings:latest
restart: always restart: always
networks: networks:
- daemon0 - wings0
ports: ports:
- "8080:8080" - "8080:8080"
- "2022:2022" - "2022:2022"
tty: true tty: true
environment: environment:
- "DEBUG=false" TZ: UTC
- "TZ=UTC" # change to the three letter timezone of your choosing DEBUG: false
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
- "/var/lib/docker/containers/:/var/lib/docker/containers/" - "/var/lib/docker/containers/:/var/lib/docker/containers/"
@ -19,17 +19,16 @@ services:
- "/var/lib/pterodactyl/:/var/lib/pterodactyl/" - "/var/lib/pterodactyl/:/var/lib/pterodactyl/"
- "/var/log/pterodactyl/:/var/log/pterodactyl/" - "/var/log/pterodactyl/:/var/log/pterodactyl/"
- "/tmp/pterodactyl/:/tmp/pterodactyl/" - "/tmp/pterodactyl/:/tmp/pterodactyl/"
## you may need /srv/daemon-data if you are upgrading from an old daemon # you may need /srv/daemon-data if you are upgrading from an old daemon
## - "/srv/daemon-data/:/srv/daemon-data/" #- "/srv/daemon-data/:/srv/daemon-data/"
## Required for ssl if you user let's encrypt. uncomment to use. # Required for ssl if you user let's encrypt. uncomment to use.
## - "/etc/letsencrypt/:/etc/letsencrypt/" #- "/etc/letsencrypt/:/etc/letsencrypt/"
networks: networks:
daemon0: daemon0:
name: daemon0 name: wings0
driver: bridge driver: bridge
ipam: ipam:
config: config:
- subnet: "172.21.0.0/16" - subnet: "172.21.0.0/16"
driver_opts: driver_opts:
com.docker.network.bridge.name: daemon0 com.docker.network.bridge.name: wings0