Skip to content

Commit 36e8141

Browse files
Ensured the parent folder of assets/userImages is included. Reduced number of layers in docker to build
1 parent 8d77580 commit 36e8141

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Ignore documentation for Github
22
docs/
3+
# Ignore my personal documentation
4+
DEV-docs/
35
# Since this is for docker we can also ignore any installer Items
46
installer/
57
# We can also discard and ignore any Git specific Items, since no git history should be maintained from the docker instance
@@ -12,7 +14,7 @@ LICENSE
1214
# Also since for now at least the scripts folder only contains a script for Windows Installation we will ignore that.
1315
scripts/
1416
# We also want to ignore any images i've uploaded for testing
15-
assets/userImages/
17+
assets/userImages/**
1618
# Ignore files specific to Docker, that aren't needed in the final build
1719
Dockerfile
1820
.dockerignore

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Start from a Debian image with the latest version of Go installed
22
# and a workspace (GOPATH) configured at /go
3+
4+
# Attempting to combine multiple RUN directives to reduce the amount of layers built
35
FROM golang
46

57
# Specify the default destination for all other commands
@@ -10,14 +12,14 @@ ADD . ./
1012

1113
# Build the gopage command inside the container
1214
# And any dependencies
13-
RUN go get github.com/spf13/viper
14-
RUN go install .
15+
RUN go get github.com/spf13/viper && go install . && go build -o /gopage
16+
# RUN go install .
1517

1618
# move the data file from clean files to the root
1719
COPY /cleanFiles/list.json /app/list.json
1820

1921
# Build the application
20-
RUN go build -o /gopage
22+
#RUN go build -o /gopage
2123

2224
# Run the gopage command by default when the container starts
2325
#ENTRYPOINT /go/bin/gopage

0 commit comments

Comments
 (0)