Skip to content

Commit f977489

Browse files
sergey-shambirlarrabee
authored andcommitted
Added Dockerfile which builds and packages s3sync (larrabee#28)
- build with golang:1.13 which based on debian:10 - package with image based on debian:10
1 parent e4b587a commit f977489

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.dockerignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Binary
2+
s3sync
3+
4+
# Vendor dir
5+
vendor/
6+
dist/

Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Build in Docker container
2+
FROM golang:1.13 as builder
3+
4+
COPY . /src/s3sync
5+
WORKDIR /src/s3sync
6+
RUN go mod vendor && \
7+
go build -o /usr/local/bin/s3sync ./cli
8+
9+
# Create s3sync image
10+
FROM debian:10
11+
COPY --from=builder /usr/local/bin/s3sync /usr/local/bin/s3sync

0 commit comments

Comments
 (0)