-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 847 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Start from the latest Golang base image based on Debian
FROM golang:1.16-buster
# Add Maintainer Info
LABEL maintainer="[email protected]"
# Disable prompts on apt-get install
ENV DEBIAN_FRONTEND noninteractive
# Set the Current Working Directory inside the container
WORKDIR /app
# Install latest stable LibreOffice
RUN apt-get update -qq \
&& apt-get install -y -q libreoffice \
&& apt-get remove -q -y libreoffice-gnome
# Cleanup after apt-get commands
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/apt/archives/*.deb /var/cache/apt/*cache.bin
# Copy the source from the current directory to the Working Directory inside the container
COPY . .
# Build the Go app
RUN go build -o main .
# Expose port 6000 to the outside world
EXPOSE 6000
# Command to run the executable
CMD ["./main"]