Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Add Dockerfile docker-compose.yml #11

Merged
merged 1 commit into from
Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.md
.*
Dockerfile
tss
dist
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.15-alpine3.12 AS dev

ENV GOOS=linux
ENV GO111MODULE=on

RUN apk add --no-cache bash && \
go get github.com/magefile/mage
WORKDIR /go/src/github.com/peaceiris/tss

# ---

FROM dev AS builder

COPY . /go/src/github.com/peaceiris/tss/

RUN mage install

# ---

FROM alpine:3.12

COPY --from=builder /go/bin/tss /usr/bin/tss

CMD ["tss", "-h"]
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'

services:
dev:
image: ghcr.io/peaceiris/tssdev:latest
build:
context: .
target: dev
container_name: peaceiris_tss_dev_latest
volumes:
- ${PWD}:/go/src/github.com/peaceiris/tss
stdin_open: true
tty: true
command:
- "bash"