Skip to content

Commit

Permalink
Merge pull request #476 from cmu-sei/v8
Browse files Browse the repository at this point in the history
updates linux client docker maker
  • Loading branch information
sei-dupdyke authored Dec 6, 2024
2 parents 708b137 + 686a057 commit 479b6ae
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 75 deletions.
36 changes: 36 additions & 0 deletions src/Dockerfile-linux-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dev

# copy csproj and restore as distinct layers
COPY ghosts.client.linux/. /app/
COPY Ghosts.Domain/. /app/Ghosts.Domain/

WORKDIR /app
RUN dotnet restore

# copy everything else and build app
COPY ghosts.client.linux/ ./ghosts.client.linux/
COPY Ghosts.Domain/ ./Ghosts.Domain/
WORKDIR /app/ghosts.client.linux/
RUN dotnet publish -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS prod

RUN apk add --no-cache \
curl \
nmap \
busybox-extras \
nikto \
openssh-client \
python3 && \
wget 'https://github.com/sqlmapproject/sqlmap/tarball/master' -O sqlmap.tar.gz && \
mkdir sqlmap && \
tar -xvf sqlmap.tar.gz -C sqlmap && \
rm sqlmap.tar.gz

COPY --from=dev /app/ghosts.client.linux/out ./app
WORKDIR /app/

ENV ASPNETCORE_URLS=http://+:5000
EXPOSE 5000/tcp

CMD ["dotnet", "./ghosts.client.linux.dll"]
2 changes: 0 additions & 2 deletions src/ghosts.client.linux/.dockerignore

This file was deleted.

39 changes: 0 additions & 39 deletions src/ghosts.client.linux/Dockerfile

This file was deleted.

37 changes: 3 additions & 34 deletions src/ghosts.client.linux/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
version: "3"

services:
staypuft-011:
image: ghosts.client.alpine
container_name: aaa
build:
context: ..
dockerfile: ghosts.client.linux/dockerfile-alpine
ghosts-client:
image: dustinupdyke/ghosts-client-linux
container_name: ghosts-client-001
volumes:
- ./config:/app/config
networks:
- custom_network
staypuft-1:
image: ghosts.client.alpine
container_name: staypuft-2
volumes:
- ./config:/app/config
networks:
- custom_network
staypuft-2:
image: ghosts.client.alpine
container_name: staypuft-1
volumes:
- ./config:/app/config
networks:
- custom_network
staypuft-3:
image: ghosts.client.alpine
container_name: staypuft-3
volumes:
- ./config:/app/config
networks:
- custom_network
networks:
custom_network:
external:
name: ghostsapi_ghosts-network

0 comments on commit 479b6ae

Please sign in to comment.