Simplified docker building

This commit is contained in:
saundersp 2024-05-01 13:36:08 +02:00
parent e5f2eac0f0
commit ac6755517b
3 changed files with 9 additions and 19 deletions

View File

@ -1,6 +0,0 @@
.ccls-cache
.git
bin
Dockerfile
LICENCE
README.md

View File

@ -1,21 +1,13 @@
FROM alpine:3.19.1 FROM alpine:3.19.1
RUN apk add make g++ RUN apk add --no-cache make=4.4.1-r2 g++=13.2.1_git20231014-r0 \
&& adduser --disabled-password saundersp
USER saundersp
WORKDIR /home/saundersp/sorting_algorithms WORKDIR /home/saundersp/sorting_algorithms
RUN adduser \ COPY *.cpp *.hpp Makefile ./
--disabled-password \
--gecos '' \
--home "$(pwd)" \
--no-create-home \
saundersp
COPY . .
RUN chown -R saundersp /home/saundersp/sorting_algorithms
USER saundersp
RUN make -j "$(nproc)" RUN make -j "$(nproc)"

4
docker-compose.yaml Normal file
View File

@ -0,0 +1,4 @@
services:
sorting_algorithms:
image: saundersp/sorting_algorithms
build: .