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,13 +1,10 @@
# ----------------------------------
# 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/

View File

@ -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
com.docker.network.bridge.name: wings0