Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
petercb committed Mar 13, 2021
1 parent eb2bbc9 commit 81674c9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
jobs:
build:
docker:
- image: jdrouet/docker-with-buildx:stable
steps:
- checkout
- setup_remote_docker:
version: 18.09.3
- run: |
docker buildx build \
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
--tag petercb/dragonfly-mc .
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git*
*.md
.circleci
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ARG ARCH=
FROM ${ARCH}golang:1.16-alpine3.13 AS build

WORKDIR /go/src/dragonfly

COPY . .

RUN go get -d -v ./...
RUN go install -v ./...

ARG ARCH=
FROM ${ARCH}alpine:3.13 AS run

WORKDIR /dragonfly
COPY --from=build /go/bin/dragonfly /dragonfly/dragonfly

CMD ["dragonfly"]

0 comments on commit 81674c9

Please sign in to comment.