Simplified docker building
This commit is contained in:
parent
e5f2eac0f0
commit
ac6755517b
@ -1,6 +0,0 @@
|
|||||||
.ccls-cache
|
|
||||||
.git
|
|
||||||
bin
|
|
||||||
Dockerfile
|
|
||||||
LICENCE
|
|
||||||
README.md
|
|
18
Dockerfile
18
Dockerfile
@ -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
4
docker-compose.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
services:
|
||||||
|
sorting_algorithms:
|
||||||
|
image: saundersp/sorting_algorithms
|
||||||
|
build: .
|
Loading…
x
Reference in New Issue
Block a user