Skip to content

Commit

Permalink
Merge pull request #244 from 030/241-docker-version
Browse files Browse the repository at this point in the history
[GH-241] Resolve 'version not shown when running docker'.
  • Loading branch information
030 authored Feb 25, 2022
2 parents 3215f41 + fe683a6 commit 810dc09
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test
virtualbox*
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Docker
on:
push:
tags:
- "*"
- '*'
jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -26,5 +26,7 @@ jobs:
with:
push: true
tags: utrecht/n3dr:${{ steps.version.outputs.version }}
build-args: |
VERSION=${GITHUB_REF}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM golang:1.17.6-alpine3.15 as builder
FROM golang:1.17.7-alpine3.15 as builder
ARG VERSION
ENV USERNAME n3dr
RUN adduser -D -g '' $USERNAME
COPY . /go/${USERNAME}/
WORKDIR /go/${USERNAME}/cmd/${USERNAME}
RUN apk add --no-cache git=~2 && \
CGO_ENABLED=0 go build && \
CGO_ENABLED=0 go build -ldflags "-X main.Version=${VERSION}" && \
cp n3dr /n3dr

FROM alpine:3.15.0
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ n3dr config \
### Build

```bash
docker build -t utrecht/n3dr:6.5.0 .
docker build -t utrecht/n3dr:6.5.1 .
```

[![dockeri.co](https://dockeri.co/image/utrecht/n3dr)](https://hub.docker.com/r/utrecht/n3dr)
Expand All @@ -325,7 +325,7 @@ docker build -t utrecht/n3dr:6.5.0 .
```bash
docker run -it \
-v /home/${USER}/.n3dr:/root/.n3dr \
-v /tmp/n3dr:/tmp/n3dr utrecht/n3dr:6.5.0
-v /tmp/n3dr:/tmp/n3dr utrecht/n3dr:6.5.1
```

### Upload
Expand All @@ -334,7 +334,7 @@ docker run -it \
docker run -it \
--entrypoint=/bin/ash \
-v /home/${USER}/.n3dr:/root/.n3dr \
-v /tmp/n3dr:/tmp/n3dr utrecht/n3dr:6.5.0
-v /tmp/n3dr:/tmp/n3dr utrecht/n3dr:6.5.1
```

navigate to the repository folder, e.g. `/tmp/n3dr/download*/` and upload:
Expand Down
2 changes: 1 addition & 1 deletion build/package/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: n3dr
base: core20
version: 6.5.0
version: 6.5.1
summary: Nexus3 Disaster Recovery
description: |
Download all artifacts at once or migrate automatically from Nexus to Nexus.
Expand Down
21 changes: 14 additions & 7 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.5.0] - 2021-01-16
## [6.5.1] - 2022-02-26

### Fixed

- version omitted when docker --version is run.

## [6.5.0] - 2022-01-16

### Added

Expand All @@ -29,7 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- some duplicated code by using `FilesToBeSkipped` and `PrintType` functions.

## [6.4.3] - 2021-01-10
## [6.4.3] - 2022-01-10

### Added

Expand All @@ -49,22 +55,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- integration tests from unit testing.

## [6.4.2] - 2021-01-03
## [6.4.2] - 2022-01-03

### Fixed

- N3DR does not fail if parameter is empty and not populated in
`~/.n3dr/config.yml` reported by
[der-eismann](https://github.com/der-eismann).

## [6.4.1] - 2021-01-03
## [6.4.1] - 2022-01-03

### Changed

- Use Go embed for logo and change path for logo file by
[der-eismann](https://github.com/der-eismann).

## [6.4.0] - 2021-01-02
## [6.4.0] - 2022-01-02

### Added

Expand Down Expand Up @@ -596,7 +602,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- URL in repositories subcommand always set to http://localhost:9999.
- URL in repositories subcommand always set to <http://localhost:9999>.

## [2.1.0] - 2019-05-19

Expand Down Expand Up @@ -654,7 +660,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Download all artifacts from a certain Nexus3 repository.

[Unreleased]: https://github.com/030/n3dr/compare/6.5.0...HEAD
[Unreleased]: https://github.com/030/n3dr/compare/6.5.1...HEAD
[6.5.1]: https://github.com/030/n3dr/compare/6.5.0...6.5.1
[6.5.0]: https://github.com/030/n3dr/compare/6.4.3...6.5.0
[6.4.3]: https://github.com/030/n3dr/compare/6.4.2...6.4.3
[6.4.2]: https://github.com/030/n3dr/compare/6.4.1...6.4.2
Expand Down

0 comments on commit 810dc09

Please sign in to comment.