docker #1

Merged
doug713705 merged 2 commits from docker into master 2025-10-05 10:52:28 +11:00
6 changed files with 28 additions and 3 deletions
Showing only changes of commit 25ccec2fd3 - Show all commits

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM debian:12 AS guinnessd-base
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y make gcc && \
useradd -m -d /home/guinness -s /bin/false -r guinness
FROM guinnessd-base
COPY . /home/guinness
WORKDIR /home/guinness
RUN make && \
mv /home/guinness/guinnessd /usr/local/bin && \
chmod +x /usr/local/bin/guinnessd && \
rm -Rf /home/guinness/* && \
apt-get remove -y make gcc && \
apt-get autoremove -y

View File

@ -11,7 +11,7 @@ all: guinness guinnessd
H_DEP = broadcast.h commands.h defines.h guinnessd.h printlog.h \
xmem.h clients.h config.h drinks.h lists.h tools.h
COPT = -Wall -g
COPT = -fPIE -Wno-error -g
D_OBJS = xmem.o broadcast.o printlog.o lists.o tools.o drinks.o \
commands.o clients.o

4
Makefile.docker Normal file
View File

@ -0,0 +1,4 @@
.PHONY: build
build:
docker build -t guinnessd:latest .

View File

@ -26,6 +26,7 @@
#include "broadcast.h"
#include "drinks.h"
pthread_mutex_t mutex_broadcast;
extern Elt *clients_list;
extern FILE *outerr;

View File

@ -32,6 +32,8 @@
#include "commands.h"
#include "config.h"
pthread_mutex_t mutex_clients;
/* Config specifique serveur */
char *adr_ip = NULL;
int port = 0;

View File

@ -30,8 +30,8 @@ typedef struct userinfos {
} userinfos;
pthread_mutex_t mutex_broadcast;
pthread_mutex_t mutex_clients;
extern pthread_mutex_t mutex_broadcast;
extern pthread_mutex_t mutex_clients;
#endif