Skip to content
Snippets Groups Projects
Select Git revision
  • 753e501ffa6c5c8c964329047762f4aa6a364d4e
  • develop default protected
  • congestioncontrol
  • merge-v-data-collection-spammer-0.8.2
  • WIP-merge-v-data-collection-spammer-0.8.2
  • merge-v-data-collection-spammer-0.7.7
  • tmp
  • test-masterpow-fixing
  • test-masterpow
  • test-echo
  • v-data-collection
  • v-data-collection-spammer
  • tmp-dump-spam-info
  • dump-msg-info-0.3.1
  • test-dump-message-info
  • spammer-exprandom
  • extra/tutorial
  • without_tipselection
  • hacking-docker-network
  • hacking-docker-network-0.2.3
  • master
  • v0.2.3
22 results

Dockerfile

Blame
  • user avatar
    Wolfgang Welz authored and GitHub committed
    * Fix/upgrade packr (#291)
    
    * :arrow_up: upgrades packr
    * :recycle: go mod tidy
    
    * Fix/upgrade yaml (#293)
    
    * :arrow_up: upgrades packr
    
    * :recycle: go mod tidy
    
    * :arrow_up: upgrades js-yarn
    
    * :arrow_up:
    
     upgrades js-yaml
    
    Co-authored-by: default avatarWolfgang Welz <welzwo@gmail.com>
    
    * Fix: docker stuff (#296)
    
    * :whale: fixes Dockerfile and docker-compose.yml
    
    * :whale: improves docker-compose
    
    * :wrench: restores config.json
    
    * :wrench:
    
     removes config.default.json
    
    * Prepare v0.1.3 (#297)
    
    * update CHANGELOG
    
    Co-authored-by: default avatarAngelo Capossele <angelocapossele@gmail.com>
    753e501f
    History
    Dockerfile 1.25 KiB
    ############################
    # Build
    ############################
    # golang:1.14.0-buster
    FROM golang@sha256:fc7e7c9c4b0f6d2d5e8611ee73b9d1d3132750108878517bbf988aa772359ae4 AS build
    
    # Ensure ca-certficates are up to date
    RUN update-ca-certificates
    
    # Set the current Working Directory inside the container
    RUN mkdir /goshimmer
    WORKDIR /goshimmer
    
    # Use Go Modules
    COPY go.mod .
    COPY go.sum .
    
    ENV GO111MODULE=on
    RUN go mod download
    RUN go mod verify
    
    # Copy everything from the current directory to the PWD(Present Working Directory) inside the container
    COPY . .
    
    # Build the binary
    RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
          -ldflags='-w -s -extldflags "-static"' -a \
           -o /go/bin/goshimmer
    
    ############################
    # Image
    ############################
    # using static nonroot image
    # user:group is nonroot:nonroot, uid:gid = 65532:65532
    FROM gcr.io/distroless/static@sha256:23aa732bba4c8618c0d97c26a72a32997363d591807b0d4c31b0bbc8a774bddf
    
    VOLUME /mainnetdb
    
    EXPOSE 14666/tcp
    EXPOSE 14626/udp
    
    # Copy the Pre-built binary file from the previous stage
    COPY --from=build /go/bin/goshimmer /run/goshimmer
    # Copy the default config
    COPY config.default.json /config.json
    
    ENTRYPOINT ["/run/goshimmer", "--config-dir=/", "--database.directory=/mainnetdb"]