mirror of
https://github.com/RustScan/RustScan
synced 2024-07-05 17:08:57 +00:00
Upgrade Alpine to 3.19.x (#373)
* Update Dockerfile Upgrade alpine to 3.13, add ca-certificates and bind-tools. * Add github/docker to dependabot. Update some of the actions * Skip Registry login for Pull Requests
This commit is contained in:
parent
f5a587accf
commit
7f80dd1678
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
|
@ -1,5 +1,13 @@
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
- package-ecosystem: cargo
|
- package-ecosystem: cargo
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
|
|
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
|
@ -38,7 +38,7 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install stable toolchain
|
- name: Install stable toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
|
@ -59,7 +59,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
|
7
.github/workflows/docker.yml
vendored
7
.github/workflows/docker.yml
vendored
|
@ -22,9 +22,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.DOCKERHUB_USERNAME }}
|
password: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
@ -32,13 +33,13 @@ jobs:
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: rustscan/rustscan
|
images: rustscan/rustscan
|
||||||
flavor: latest=true
|
flavor: latest=true
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: ${{ contains(fromJson('["push", "release"]'), github.event_name) }} # Publish to docker registry only on push event or new release.
|
push: ${{ contains(fromJson('["push", "release"]'), github.event_name) }} # Publish to docker registry only on push event or new release.
|
||||||
|
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -74,7 +74,7 @@ jobs:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Build Stage
|
||||||
FROM rust:alpine as builder
|
FROM rust:alpine as builder
|
||||||
LABEL maintainer="RustScan <https://github.com/RustScan>"
|
LABEL maintainer="RustScan <https://github.com/RustScan>"
|
||||||
RUN apk add --no-cache build-base
|
RUN apk add --no-cache build-base
|
||||||
|
@ -8,13 +9,17 @@ COPY Cargo.toml Cargo.lock ./
|
||||||
COPY src/ src/
|
COPY src/ src/
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
|
||||||
FROM alpine:3.17
|
# Release Stage
|
||||||
|
FROM alpine:3.19.1 as release
|
||||||
LABEL author="Hydragyrum <https://github.com/Hydragyrum>"
|
LABEL author="Hydragyrum <https://github.com/Hydragyrum>"
|
||||||
LABEL author="LeoFVO <https://github.com/LeoFVO>"
|
LABEL author="LeoFVO <https://github.com/LeoFVO>"
|
||||||
|
|
||||||
RUN addgroup -S rustscan && \
|
RUN addgroup -S rustscan && \
|
||||||
adduser -S -G rustscan rustscan && \
|
adduser -S -G rustscan rustscan && \
|
||||||
ulimit -n 100000 && \
|
ulimit -n 100000 && \
|
||||||
apk add --no-cache nmap nmap-scripts wget
|
apk add --no-cache nmap nmap-scripts wget ca-certificates bind-tools
|
||||||
|
|
||||||
USER rustscan
|
USER rustscan
|
||||||
COPY --from=builder /app/rustscan/target/release/rustscan /usr/local/bin/rustscan
|
COPY --from=builder /app/rustscan/target/release/rustscan /usr/local/bin/rustscan
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/bin/rustscan" ]
|
ENTRYPOINT [ "/usr/local/bin/rustscan" ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user