Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove docker platform specification #1654

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# STAGE: base
## Compiles Sliver for use
FROM --platform=linux/amd64 golang:1.22.2 as base
FROM golang:1.22.2 as base

### Base packages
RUN apt-get update --fix-missing && apt-get -y install \
Expand All @@ -29,7 +29,7 @@ RUN cp -vv sliver-server /opt/sliver-server
# STAGE: test
## Run unit tests against the compiled instance
## Use `--target test` in the docker build command to run this stage
FROM --platform=linux/amd64 base as test
FROM base as test

RUN apt-get update --fix-missing \
&& apt-get -y upgrade \
Expand All @@ -43,7 +43,7 @@ RUN /go/src/github.com/bishopfox/sliver/go-tests.sh

# STAGE: production
## Final dockerized form of Sliver
FROM --platform=linux/amd64 debian:bookworm-slim as production
FROM debian:bookworm-slim as production

### Install production packages
RUN apt-get update --fix-missing \
Expand Down Expand Up @@ -91,15 +91,11 @@ ENTRYPOINT [ "/opt/sliver-server" ]


# STAGE: production-slim (about 1Gb smaller)
### Slim production image, i.e. without MSF and assoicated libraries
### Still include GCC and MinGW for cross-platform generation
FROM --platform=linux/amd64 debian:bookworm-slim as production-slim
FROM debian:bookworm-slim as production-slim

### Install production packages
RUN apt-get update --fix-missing \
&& apt-get -y upgrade \
&& apt-get -y install \
build-essential mingw-w64 binutils-mingw-w64 g++-mingw-w64 gcc-multilib
&& apt-get -y upgrade

### Cleanup unneeded packages
RUN apt-get autoremove -y \
Expand Down
Loading