-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12f7710
commit a3c6f30
Showing
1 changed file
with
7 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
FROM golang:latest | ||
LABEL authors="nik" | ||
|
||
# This dockerfile for run test Golang app | ||
# Copy all files from current directory to /app in container | ||
COPY . /app | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Run go test | ||
CMD ["go", "test", "-v"] | ||
COPY go.mod . | ||
COPY go.sum . | ||
|
||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
# console run command | ||
# docker build -t go-test . | ||
CMD ["go", "test", "-v", "./..."] |