dockerfile (incomplete)
This commit is contained in:
parent
afa799c0ba
commit
b0e5ac8318
1 changed files with 31 additions and 0 deletions
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
FROM scottyhardy/docker-wine:stable-9.0-20240915
|
||||
|
||||
ARG SQL_ADDRESS
|
||||
ARG SQL_ACCOUNT
|
||||
ARG SQL_PASSWORD
|
||||
ARG SERVER_PRIVATE_IP
|
||||
ARG SERVER_PUBLIC_IP
|
||||
ARG SERVER_NAME
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install golang-go ripgrep xvfb -y
|
||||
|
||||
# Start display for headless wine
|
||||
RUN Xvfb :0 -screen 0 1024x768x16 &
|
||||
# Install wine dependencies
|
||||
COPY ./wine.sh .
|
||||
RUN ./wine.sh
|
||||
|
||||
# Build go program
|
||||
COPY ./go.mod ./main.go ./
|
||||
RUN go build && chmod +x ./main
|
||||
|
||||
# Copy deploy and replace values
|
||||
COPY ./deploy ./deploy
|
||||
COPY ./replace.sh .
|
||||
RUN ./replace.sh "${SQL_ADDRESS}" "${SQL_ACCOUNT}" "${SQL_PASSWORD}" "${SERVER_PRIVATE_IP}" "${SERVER_PUBLIC_IP}" "${SERVER_NAME}"
|
||||
|
||||
CMD [ "./main" ]
|
||||
|
||||
Loading…
Add table
Reference in a new issue