Skip to content

Commit

Permalink
change docker image registry from Docker Hub to GitHub Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Dec 8, 2020
1 parent 35dbcd5 commit c1bc13e
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 19 deletions.
24 changes: 14 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM alpine:3.10.1

ARG version="1.0.0"

LABEL maintainer="Haruaki Tamada" \
tjdoe-version="1.0.0" \
description=""
tjdoe-version="${version}" \
description="anonymizing given programs for programming courses and their scores for grades."

RUN adduser -D tjdoe \
&& apk --no-cache add curl=7.66.0-r0 tar=1.32-r0 \
&& curl -s -L -O https://github.com/tamada/tjdoe/releases/download/v1.0.0/tjdoe-1.0.0_linux_amd64.tar.gz \
&& tar xfz tjdoe-1.0.0_linux_amd64.tar.gz \
&& mv tjdoe-1.0.0 /opt \
&& ln -s /opt/tjdoe-1.0.0 /opt/tjdoe \
&& ln -s /opt/tjdoe /usr/local/share/tjdoe \
&& rm tjdoe-1.0.0_linux_amd64.tar.gz \
&& ln -s /opt/tjdoe/tjdoe /usr/local/bin/tjdoe
&& apk update \
&& apk --no-cache add --virtual .builddeps curl tar \
&& curl -s -L -O https://github.com/tamada/tjdoe/releases/download/v${version}/tjdoe-${version}_linux_amd64.tar.gz \
&& tar xfz tjdoe-${version}_linux_amd64.tar.gz \
&& mv tjdoe-${version} /opt \
&& ln -s /opt/tjdoe-${version} /opt/tjdoe \
&& rm tjdoe-${version}_linux_amd64.tar.gz \
&& ln -s /opt/tjdoe/tjdoe /usr/local/bin/tjdoe \
&& apk del --purge .builddeps

ENV HOME="/home/tjdoe"

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/tamada/tjdoe)](https://goreportcard.com/report/github.com/tamada/tjdoe)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/tamada/tjdoe/blob/master/LICENSE)
[![Version](https://img.shields.io/badge/Version-1.0.0-yellowgreen.svg)](https://github.com/tamada/tjdoe/releases/tag/v1.0.0)
[![Docker](https://img.shields.io/badge/docker-tamada%2Ftjdoe%3Alatest-blue?logo=docker&style=social)](https://github.com/users/tamada/packages/container/package/tjdoe)


# tjdoe

Expand Down Expand Up @@ -60,7 +62,7 @@ SCORES...
### :whale: Docker
```sh
$ docker run --rm -v $PWD:/home/jjdoes tamada/tjdoe:1.0.0 rootdir scores.csv...
$ docker run --rm -v $PWD:/home/tjdoe tamada/tjdoe:1.0.0 rootdir scores.csv...
```
Above command should run on directory which has `scores.csv` and `rootdir`.
Expand All @@ -73,7 +75,7 @@ The meaning of the options above command are as follows.
* share volumen `$PWD` in the host OS to `/home/tjdoe` in the container OS.
* Note that `$PWD` must be the absolute path.
[![Docker](https://img.shields.io/badge/docker-tamada%2Ftjdoe%3Alatest-blue?logo=docker&style=social)](https://hub.docker.com/r/tamada/tjdoe)
[![Docker](https://img.shields.io/badge/docker-tamada%2Ftjdoe%3Alatest-blue?logo=docker&style=social)](https://github.com/users/tamada/packages/container/package/tjdoe)
## Others
Expand Down
4 changes: 3 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
PWD := ${CURDIR}
DOCKER_IMAGE_NAME := "www9tjdoe"
DOCKER_IMAGE := "jojomi/hugo:latest"
JOJOMI_VERSION := 0.69.0
DOCKER_IMAGE := "jojomi/hugo:${JOJOMI_VERSION}"

define _docker_run
docker run --rm --name $1 $2 --interactive --volume ${PWD}:/src --volume ${PWD}/public:/output --workdir /src --entrypoint hugo $(DOCKER_IMAGE) $3
endef

build:
@$(call _docker_run,${DOCKER_IMAGE_NAME}_build,--tty,--buildFuture)
rm -f public/favicon-16x16.png public/favicon-32x32.png public/favicon.ico public/apple-touch-icon.png

start:
@$(call _docker_run,${DOCKER_IMAGE_NAME},-d --publish 1313:1313,server --bind="0.0.0.0" --buildFuture)
Expand Down
2 changes: 1 addition & 1 deletion docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: ":house: Home"
[![Go Report Card](https://goreportcard.com/badge/github.com/tamada/tjdoe)](https://goreportcard.com/report/github.com/tamada/tjdoe)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/tamada/tjdoe/blob/master/LICENSE)
[![Version](https://img.shields.io/badge/Version-1.0.0-yellowgreen.svg)](https://github.com/tamada/tjdoe/releases/tag/v1.0.0)
[![Docker](https://img.shields.io/badge/docker-tamada%2Ftjdoe%3Alatest-blue?logo=docker&style=social)](https://hub.docker.com/r/tamada/tjdoe)
[![Docker](https://img.shields.io/badge/docker-tamada%2Ftjdoe%3Alatest-blue?logo=docker&style=social)](https://github.com/users/tamada/packages/container/package/tjdoe)

## :bookmark_tabs: Description

Expand Down
1 change: 0 additions & 1 deletion docs/content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ title: ":smile: About"
## `tjdoe`

`tjdoe` means 'to John/Jane Doe.'

2 changes: 1 addition & 1 deletion docs/content/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The meaning of the options above command are as follows.
* share volumen `$PWD` in the host OS to `/home/tjdoe` in the container OS.
* Note that `$PWD` must be the absolute path.
[![Docker](https://img.shields.io/badge/docker-tamada%2Ftjdoe%3Alatest-blue?logo=docker&style=social)](https://hub.docker.com/r/tamada/tjdoe)
[![Docker](https://img.shields.io/badge/docker-tamada%2Ftjdoe%3Alatest-blue?logo=docker&style=social)](https://github.com/users/tamada/packages/container/package/tjdoe)
## Others
Expand Down
6 changes: 3 additions & 3 deletions docs/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
{{ $caymanScss := "scss/cayman.scss" }}
{{ $options := (dict "targetPath" "css/cayman.css") }}
{{ $caymanCss := resources.Get $caymanScss | resources.ExecuteAsTemplate $caymanScss . | toCSS $options | fingerprint }}
<link rel="icon" href="{{ $.Site.BaseURL }}favicon.ico">
<link rel="stylesheet" href="{{ $caymanCss.Permalink }}">
<link rel="stylesheet" href="{{ "tjdoe.css" | absURL }}">
<!-- Icon made by Freepik, from Flaticon, licensed by CC 3.0. -->
<!-- https://www.flaticon.com/free-icon/island_1530732 -->
<link rel="apple-touch-icon" sizes="180x180" href="/images/harry.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/harry.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/harry.png">
{{ partial "katex.html" . }}
<title>{{ .Title | emojify }} | {{ $.Site.Title }}</title>
</head>
Binary file removed docs/static/favicon.ico
Binary file not shown.

0 comments on commit c1bc13e

Please sign in to comment.